Tag Archives: asp

Generic Repository for Entity Framework with DbContext and Code First

I’ve recently been developing a small n-tier application using Domain Driven Development. In the interests of having a separation of concerns I built a generic repository that can be passed into my services.   using System; using System.Data; using System.Linq; using System.Data.Entity; using System.Linq.Expressions;   namespace Swink.Repositories { public class Repository<TEntity, TContext> : IRepository<TEntity>, IDisposable [...]