Generic repository, DI, Aggregation Roots
问题 Having a generic repository like public class Repository<T> where T: Entity<T> { /*anything else*/ } should concrete repositories per agregation root like class ProductRepository : Repository<Product> { } class CategoryRepository : Repository<Category> { } be created? Also how do I use DI ( Ninject ) with generic implementation of repository. Samples are apreciated! Thanks! 回答1: I see a lot of misuse of generics in the questions in SO and while it does not necessarily refer to your question