Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ private abstract class Blog

private class ServicePropertiesContext : DbContext
{
private static readonly InMemoryDatabaseRoot _databaseRoot = new();

protected internal override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseInMemoryDatabase(GetType().Name);
=> optionsBuilder.UseInMemoryDatabase(GetType().Name, _databaseRoot);

public DbSet<PrivateUnmappedBaseSuper> PrivateUnmappedBaseSupers
=> Set<PrivateUnmappedBaseSuper>();
Expand Down
2 changes: 1 addition & 1 deletion test/EFCore.Tests/ServiceProviderCacheTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
[ConditionalFact]
public void Service_provider_cache_can_be_cleared()
{
var cache = ServiceProviderCache.Instance;
var cache = new ServiceProviderCache();
var options = new DbContextOptionsBuilder().UseInMemoryDatabase("TestDB").Options;

var provider1 = cache.GetOrAdd(options, providerRequired: false);
Expand Down
Loading