This article's idea is very good to solve this kind of problems, that share the core functions and at the same time provide extend functions for customization.http://romiller.com/2013/02/05/extending-and-customizing-code-first-models-part-1/However, there is a question in this article: it doesn't use GenericRepository + IoC to dynamically inject domain classes during run time. You could use \[code\]var customer = ModelCustomizer.Create<Customer>();\[/code\]But with GenericRepository + IoC, you are not use in this way, rather than just \[code\]ObjectFactory.Configure(x =>{ x.For<IUnitOfWorkFactory>().Use<EFUnitOfWorkFactory>(); x.For(typeof(IRepository<>)).Use(typeof(Repository<>)); x.For(typeof(IEnumRepository<,>)).Use(typeof(EnumRepository<,>));});public class UserRepository : GenericRepository<User>\[/code\]So, is there a way we could use the same idea in GenericRepository + IoC patterns?