EF 4.1+ POCO, Repository and Specification Pattern Framework

added by wladek
5/22/2012 8:49:15 AM

3 Kicks, 945 Views

I've been playing around with Code First EF implementations for awhile now and by far the best implementation I've seen is a framework by Huy Rua. It has the following functionality baked in: True Separation of Concerns for entities (no need for a data annotations dependency). A Generic Repository. This should do the trick for 80% of your standard CRUD operations without the need for repo's per entity. Supports multiple DbContext's and builds them dynamically. And finally a straightforward Specification pattern implementation. I use it as a base data layer for all my projects.


5/22/2012 8:48:57 AM
Direct links in case you missed them the first time like I did ;-)

I don't use the repository pattern much myself. The specification pattern is pretty interesting though, seems like a nice way to add an abstraction over your querying capabilities.