Testing with the EF In-Memory Database


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.


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: