Dependency injection with EF DbContext that implements 2 interfaces
问题 Given a DbContext that implements 2 interfaces like so: public interface IQueryEntities { IQueryable<User> Users { get; } IQueryable<Computer> Computers { get; } // other IQueryable<T> get properties } public interface IUnitOfWork { int SaveChanges(); } public class MyContext : DbContext, IQueryEntities, IUnitOfWork { // implement interfaces using EF } First question, is it a bad idea to separate out the query aspects of DbContext (IDbSets) from the command aspects (SaveChanges)? I am