Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First to say Entity Framework implements a Repository pattern and a Unit of Work Pattern. Implementing Repository and Unit of Work patterns on top of a modern ORM like Entity framework is an additional layer of abstraction that:</p> <ul> <li>narrows the possibilities of the underlying ORM </li> <li>does not provide additional value to the underlying ORM</li> <li>is at best worthless but may be harmful </li> </ul> <p>One purpose of such implementations is to encapsulate the query logic in the Repository and not one query like Single Responsibility Principle (<a href="http://en.wikipedia.org/wiki/Single_responsibility_principle" rel="nofollow">SRP</a>) would suggest, but a couple of queries and thus violating SRP. What you could do is to rely on your ORM and encapsulate extensive query logic in single Query classes.</p> <p>My suggestion is not to please "best practices" by adding abstraction layers on abstraction layers and so on but to try to solve a problem using some more general design guidelines such as <a href="http://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29" rel="nofollow">SOLID</a>.</p> <p>Ayende Rahien reviews the Northwind Starter Kit application in a series of blog posts (<a href="http://ayende.com/blog/153059/northwind-starter-kit-review-if-you-wonrsquo-t-respect-the-database-there-will-be-pain" rel="nofollow">here</a>, <a href="http://ayende.com/blog/153699/ask-ayende-repository-for-abstracting-multiple-data-sources" rel="nofollow">here</a>, <a href="http://ayende.com/blog/153153/northwind-starter-kit-review-refactoring-to-an-actual-read-model" rel="nofollow">here</a>, <a href="http://ayende.com/blog/153058/northwind-starter-kit-review-data-access-review-thoughts" rel="nofollow">here</a>, <a href="http://ayende.com/blog/153057/northwind-starter-kit-review-the-parents-have-eaten-sour-grapes-and-the-childrenrsquo-s-teeth-are-set-on-edge" rel="nofollow">here</a>, <a href="http://ayende.com/blog/153029/northwind-starter-kit-review-data-access-and-the-essence-of-needless-work-part-ii" rel="nofollow">here</a>, <a href="http://ayende.com/blog/153028/northwind-starter-kit-review-data-access-and-the-essence-of-needless-work-part-i" rel="nofollow">here</a> and <a href="http://ayende.com/blog/152706/application-review-northwind-starter-kit" rel="nofollow">here</a>) in <a href="http://ayende.com/blog" rel="nofollow">his blog</a> that deal with so called best practices applied in an application. This is a great read!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload