Nethouse Unit of Work Pattern

with No Comments

I’ve published an early draft of Nethouse UoW for EntityFramework 6.1+.

The code is available on Github:

The library comes with a small interface for unit of work, which can be implemented ontop of your existing DbContext derivates.
There are no methods that needs to be implemented manually, all methods are already provided by the default DbContext base class.
The library also contains a TestUnitOfWork and TestDbSet<T> which can be used for testing.
The benefit of this is that if you implement repository classes or other code that needs access to the datacontext, you can now pass the IUnitOfWork instead.
By doing so, we now enable the code to run any Linq queries against our in memory test implementation.¨

Follow Roger Alsing:

Developer, Mentor and Architect. Co-Founder of the Akka.NET actor model framework.

Leave a Reply