Merge pull request #5742 from sbwalker/dev

preserve previous servicelifetime setting
This commit is contained in:
Shaun Walker
2025-10-22 14:31:02 -04:00
committed by GitHub

View File

@ -171,7 +171,7 @@ namespace Microsoft.Extensions.DependencyInjection
public static IServiceCollection AddOqtaneDbContext(this IServiceCollection services)
{
services.AddDbContext<MasterDBContext>(options => { }, ServiceLifetime.Transient);
services.AddDbContext<TenantDBContext>(options => { }, ServiceLifetime.Scoped);
services.AddDbContext<TenantDBContext>(options => { }, ServiceLifetime.Transient);
services.AddDbContextFactory<TenantDBContext>(opt => { }, ServiceLifetime.Transient);
return services;
}