I have looked at the example for using SQLite in-memory databases to test an EF Core application from Microsoft.
https://docs.microsoft.com/en-us/ef/core/testing/sqli