@@ -48,7 +48,7 @@ public static IServiceCollection AddTriggeredDbContextPool<TContext>(this IServi
4848 serviceCollection . Replace ( ServiceDescriptor . Describe (
4949 serviceType : typeof ( TContext ) ,
5050 implementationFactory : serviceProvider => SetApplicationTriggerServiceProviderAccessor ( serviceDescriptor . ImplementationFactory ( serviceProvider ) , serviceProvider ) ,
51- lifetime : ServiceLifetime . Scoped
51+ lifetime : ServiceLifetime . Transient
5252 ) ) ;
5353 }
5454
@@ -79,7 +79,7 @@ public static IServiceCollection AddTriggeredDbContextFactory<TContext>(this ISe
7979 serviceCollection . Replace ( ServiceDescriptor . Describe (
8080 serviceType : typeof ( IDbContextFactory < TContext > ) ,
8181 implementationFactory : serviceProvider => ActivatorUtilities . CreateInstance ( serviceProvider , triggeredFactoryType , serviceProvider . GetRequiredService ( serviceDescriptor . ImplementationType ) , serviceProvider ) ,
82- lifetime : ServiceLifetime . Scoped
82+ lifetime : ServiceLifetime . Transient
8383 ) ) ;
8484 }
8585
@@ -110,7 +110,7 @@ public static IServiceCollection AddTriggeredDbContextFactory<TContext, TFactory
110110 serviceCollection . Replace ( ServiceDescriptor . Describe (
111111 serviceType : typeof ( IDbContextFactory < TContext > ) ,
112112 implementationFactory : serviceProvider => ActivatorUtilities . CreateInstance ( serviceProvider , triggeredFactoryType , serviceProvider . GetRequiredService ( serviceDescriptor . ImplementationType ) , serviceProvider ) ,
113- lifetime : ServiceLifetime . Scoped
113+ lifetime : ServiceLifetime . Transient
114114 ) ) ;
115115 }
116116
0 commit comments