preserve previous servicelifetime setting

This commit is contained in:
sbwalker
2025-10-22 14:30:47 -04:00
parent 273097d96d
commit ac9b7a60fd

View File

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