Testing with EF Core
I’ve been recently migrating some existing EF6 code to EF Core. One aspect of EF Core I don’t often see is how testing with EF Core is drastically better than Entity Framework 6. There are two ways I’ve been handling running tests that use EF Core: Using In-Memory Provider and SQLite Provider but with SQLite In-Memory. DbContext First thing I needed to do was have a constructor that took the OptionsBuilder that I could configure my DbContext options outside of the dbContext itself. This enables us to configure our context to use the InMemory Provider. During the OnConfiguring, check to… Read More »Testing with EF Core