don't use try since you want to register more than one service.
This commit is contained in:
parent
a8b4c6ad7d
commit
744ceeb8d5
@ -13,7 +13,7 @@ namespace PoweredSoft.Data.EntityFrameworkCore
|
|||||||
{
|
{
|
||||||
services.AddPoweredSoftDataServices();
|
services.AddPoweredSoftDataServices();
|
||||||
services.TryAddTransient<IDbContextFactoryProvider, DbContextFactoryProvider>();
|
services.TryAddTransient<IDbContextFactoryProvider, DbContextFactoryProvider>();
|
||||||
services.TryAddTransient<IAsyncQueryableHandlerService, AsyncQueryableHandlerService>();
|
services.AddTransient<IAsyncQueryableHandlerService, AsyncQueryableHandlerService>();
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ namespace PoweredSoft.Data.MongoDB
|
|||||||
public static IServiceCollection AddPoweredSoftMongoDBDataServices(this IServiceCollection services)
|
public static IServiceCollection AddPoweredSoftMongoDBDataServices(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddPoweredSoftDataServices();
|
services.AddPoweredSoftDataServices();
|
||||||
services.TryAddTransient<IAsyncQueryableHandlerService, AsyncQueryableHandlerService>();
|
services.AddTransient<IAsyncQueryableHandlerService, AsyncQueryableHandlerService>();
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user