New answers tagged

3

The Entity Framework DbContext is a unit of work, and its DbSet<T> properties are repositories. That's not to say that you should never roll your own layer on top of them, but you're correct in asserting that the db context, in the way you're using it, precludes the main goal of a unit of work. Your situation is quite unique in that you manually ...


3

The Unit-Of-Work pattern makes sense when you have a complex use case with several objects involved, often objects which map to different master-detail tables. As part of the use case, you want to pull all the required objects out of the database let the user edit these objects (his local copy), until they are satisfied with the result. "Edit" here may ...


Top 50 recent answers are included