UPDATE December 2023: Updated for .NET 8! While the talk is originally for EF Core 2.1, majority of the points as well as code is still relevant in EF Core 8!
When doing unit tests for EF Core, we can use in-memory-database to test functionalities but sometimes we needs to use SQL features. That's where SQLite comes into play.
When running the tests, 2 tests will fail:
- InMemoryDbTests.ShouldFailWhenIncludeIsNotUsed
- InMemoryDbTests.ShouldNotBeAbleToExecuteSql
This is intended to demonstrate when and why EF Core In-Memory DB provider won't work and SQLite is a better choice.
Original blog post: .NET Core complex EF Core unit testing (February 2018)