Various topics from software architecture part 4: the unit of work continued
June 25, 2015 2 Comments
Introduction
In the previous post we looked at the basic goals and the abstractions associated with the unit of work pattern. We came to the conclusion that it might not be necessary to introduce an abstraction for the unit of work to begin with as modern ORMs like EntityFramework already have a well-tested unit of work object inside. There may still be cases though where you can make use of the pattern and the associated unit of work repository.
In this post we’ll see some possible mock implementations of these abstractions and how they can be wired up in the repository layer.
Implementation stubs
We’ll briefly look at some implementation skeletons for the IUnitOfWork and IUnitOfWorkRepository interfaces and how they can be used in a concrete repository.