Implementation of the Entity Framework Specification Pattern

c# design-patterns entity-framework

Question

How-to implement Specification Pattern with Entity Framework ?

1
17
2/28/2010 9:30:31 PM

Popular Answer

  1. Specification Pattern:
    For those who want a primer, visit this link.

  2. Understand Specification for Entity Framework:
    Read this. This covers the following very important points. In any sort of real world application you will quickly want to chain multiple specifications together. This is referred to as composing specifications. You will need to gain a grasp of some of the caveats for the resolution of specification composition within Linq to Entities. You need to know this because using Linq to Entities is the desirable approach to expressing specification satisfaction criteria.

  3. Fix the Badness:
    Download and install this. It fixes the shortcoming of Linq to Entities that you read about in step two. This explains more detail of the fix's implementation.

  4. Implement It!
    You should have enough information to implement the pattern. Keep googling. Doing this for EF is not entirely simple but well worth the effort. This is a very interesting implementation.

17
5/8/2013 9:54:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow