Efcore: Improve the experience for using SQLite in-memory databases

Created on 14 Jun 2019  路  5Comments  路  Source: dotnet/efcore

For example, some sugar to make it easier to keep a connection open across multiple context instances.

@divega @bricelam I believe you guys have some additional thoughts here--maybe link some of the information from Brice's blog?

area-sqlite type-enhancement

Most helpful comment

Documentation on Registering with Dependency Injection and maintaining re-hydrating state across multiple tests would be useful as well.

All 5 comments

Maybe also document which features need to be implemented "manually", for example I had to specify a standard default value for concurrency tokens, a converter for concurrency tokens, a comparer for concurrency tokens and a converter for datetimeoffssets

Documentation on Registering with Dependency Injection and maintaining re-hydrating state across multiple tests would be useful as well.

I only just spotted this and haven't tried it, but perhaps it's made for this scenario:
Sharable in-memory

Data Source=Sharable;Mode=Memory;Cache=Shared

It's probably obvious, but there is no mention which Nuget package to install if someone want to use EF Sqlite in-memory feature.

@Ninjanaut It doesn't require a different NuGet package; it's a feature built in to SQLite.

Was this page helpful?
0 / 5 - 0 ratings