diff --git a/test/Configuration.IntegrationTests/TestHosts/ConfigurationHost.cs b/test/Configuration.IntegrationTests/TestHosts/ConfigurationHost.cs index b5d5b4b86..9880cfb88 100644 --- a/test/Configuration.IntegrationTests/TestHosts/ConfigurationHost.cs +++ b/test/Configuration.IntegrationTests/TestHosts/ConfigurationHost.cs @@ -12,6 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage; using Duende.IdentityServer.Services; using Duende.IdentityServer.EntityFramework.Options; +using Duende.IdentityServer.EntityFramework.Storage; namespace IntegrationTests.TestHosts; @@ -39,8 +40,10 @@ private void ConfigureServices(IServiceCollection services, InMemoryDatabaseRoot }) .AddClientConfigurationStore(); services.AddSingleton(new ConfigurationStoreOptions()); - services.AddDbContext(opt => - opt.UseInMemoryDatabase("configurationDb", databaseRoot)); + services.AddConfigurationDbContext(options => { + options.ConfigureDbContext = b => + b.UseInMemoryDatabase("configurationDb", databaseRoot); + }); } private void Configure(WebApplication app)