Testing components using EF Core

You may want to test components using something that approximates connecting to the real database, without the overhead of actual database I/O operations.

There are two main options for doing this:

  • SQLite in-memory mode allows you to write efficient tests against a provider that behaves like a relational database.
  • The InMemory provider is a lightweight provider that has minimal dependencies, but does not always behave like a relational database.