You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use the databaseRoot parameter of UseInMemoryDatabase to provide test isolation when using the in-memory provider. Unfortunately setting this parameter leads to a huge performance overhead because the model is rebuilt for every test.
…he singleton options.
- Remove the DatabaseRoot from the InMemoryOptionsExtension service provider equality condition.
- Remove the DatabaseRoot from the InMemorySingletonOptions.
- Resolve the IInMemoryStore in a scoped service (IInMemoryStoreProvider) instead of a singleton service (IInMemoryStoreCache).
- Fall back to the DatabaseRoot stored in a singleton service (IInMemoryDatabaseRootCache) if the options does not specify one.
Fixesdotnet#34476
We use the
databaseRoot
parameter ofUseInMemoryDatabase
to provide test isolation when using the in-memory provider. Unfortunately setting this parameter leads to a huge performance overhead because the model is rebuilt for every test.Reproduction steps
EF Core version
Database provider:
Microsoft.EntityFrameworkCore.InMemory
8.0.8
Target framework: .NET 8.0
Operating system: Windows 11 22H2
IDE: Visual Studio 2022 (64-bit) 17.10.1
The text was updated successfully, but these errors were encountered: