How to Mock Entity Framework’s DbContext for Unit Testing
May 26,
2016
One of the frustrating things (there are more) when trying to mock Microsoft’s Entity Framework ORM is that it isn’t unit test friendly. In practice, I tend to wrap the Entity Framework classes in a repository abstraction layer, which gives me control over the interface, so writing unit tests becomes a relatively trivial exercise. The problem […]