I configured my ASP.NET Core 2.2 app using UseInMemoryDatabase() and it worked fine. Now I changed it to relational Sqlite in-memory.
Startup.cs
services.AddDbContext<ApplicationContext>(options => options.UseSqlite("Datasource=file::memory:?cache=shared"));
I use this Sqlite in-memory approach in unit tests and it work good. So decided I want to use the same in-memory Sqlite in my app (to test some things, later when app will be ready I'll create sqlite file on disk). The problem is when I starting my app. I receive erros like SqliteException: SQLite Error 1: 'no such table: USERS'. I debug my repository class and I found that context has table Users.
So Sqlite in-memory works fine in unit tests but in real app throws error. Why is that? Thanks for any tips.

Create and apply migrations to your in-memory SQLite database. You'll have to apply them every time the app starts, since the database only exists in memory until the application exits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With