Testing with the EF In-Memory Database
Warning
The EF in-memory database often behaves differently than relational databases. Only use the EF in-memory database after fully understanding the issues and trade-offs involved, as discussed in Testing code that uses EF Core.
Tip
SQLite is a relational provider and can also use in-memory databases. Consider using this for testing to more closely match common relational database behaviors. This is covered in Using SQLite to test an EF Core application.
The information on this page now lives in other locations:
- See Testing code that uses EF Core for general information on testing with the EF in-memory database.
- See Sample showing how to test applications that use EF Core for a sample using the EF in-memory database.
- See The EF in-memory database provider for general information about the EF in-memory database.