Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I tend to think the 2nd way does not fit to the Repository pattern. It seems the first way is lesser evil by now. I plan to do some investigations on UoW too. Commented Apr 18, 2014 at 14:34
  • @VitalyChirkov It doesn't matter if it is on repository or on some service class. And repository in itself is a service class. Commented Apr 18, 2014 at 14:35
  • IMHO, the service sould not have a state. But the Repository has a collection semantics and has a state. Commented Apr 18, 2014 at 14:39
  • 1
    @VitalyChirkov True. But still, this method could be part of the repository. Because each repository is closely related to the entity it persist. So it is logical this repository can have methods that manipulate those entities. Commented Apr 18, 2014 at 14:44