Tag Archives: Repository

Unit Testing on Top of Entity Framework DbContext

When writing unit tests one of the challenges is to isolate your tests from everything. To isolate them from the code that is not in their target and also from the other tests. As Roy Osherove puts it in his … Continue reading

Posted in .NET, Technical, Unit Testing | Tagged , , , , | Leave a comment

Repository Implementations

In my previous post I have presented a way to separate your data access from the business logic, when a relational database is used. I have shown another implementation of the well-known Repository pattern. Since Martin Fowler described it in … Continue reading

Posted in .NET, Design, Technical | Tagged , , , , , , , , | Leave a comment

Separating Data Access Concern

In our days most of the applications that have a relational database as storage, use an ORM to access the data. The ORM (Entity Framework, Hibernate, etc.) does most of the data access implementation. Many of them have a modern … Continue reading

Posted in .NET, Design, Technical | Tagged , , , , , , , , , , | Leave a comment

Who Disposes Your Repository

Recently, I’ve went again through the discussion of how the Repository Pattern works with Dependency Injection (DI) in one of the projects I’m involved in. Even if these patterns are around for a while and there are many examples on … Continue reading

Posted in .NET, Design, Technical | Tagged , , , , , , , , , , | Leave a comment