Skip to content

Commit

Permalink
Fix configuraiton of dbcontext in integrationtest
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannikolei committed Nov 17, 2024
1 parent 5f67602 commit fb9c8c0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -39,8 +40,10 @@ private void ConfigureServices(IServiceCollection services, InMemoryDatabaseRoot
})
.AddClientConfigurationStore();
services.AddSingleton(new ConfigurationStoreOptions());
services.AddDbContext<ConfigurationDbContext>(opt =>
opt.UseInMemoryDatabase("configurationDb", databaseRoot));
services.AddConfigurationDbContext(options => {
options.ConfigureDbContext = b =>
b.UseInMemoryDatabase("configurationDb", databaseRoot);
});
}

private void Configure(WebApplication app)
Expand Down

0 comments on commit fb9c8c0

Please sign in to comment.