Introduction First off, let me make a few assumptions if you’re reading this article and trying to mock with Entity Framework 6:
You’re on a legacy codebase. If you weren’t you’d be using Entity Framework Core and the In-Memory Provider. You’re not utilizing Database Migrations. If you were, it may probably be easier to create a new database and run tests using localDb. Your schema is extremely large. With a large database schema (often seen in legacy systems) data setup can become extremely difficult.
Read more...
Mocking Entity Framework 6 - How To Do It, When NOT To Do It
December 16, 2021 in Testing TDD Entity FrameworkRead Time: 8 minutes