Wednesday November 25th

3 Kicks

EF 4.1+ POCO, Repository and Specification Pattern Framework

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.


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.

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network