Multiple generic repositories in unitofwork?
Lets say I have 2 tables. ProductCategory and Product . I have 1 generic repository that can handle both tables: public class GenericRepository<T> : IRepository<T> But when using unit of work pattern, am I forced to create a repository for ALL tables in my database? public interface IUnitOfWork : IDisposable { int SaveChanges(); IRepository<ProductCategory> ProductCategoryRepository { get; } IRepository<Product> ProductRepository { get; } } Is there not a way I can add the generic repository to the unit of work class? You can add a generic method to the IUnitOfWork interface: public interface