From 744ceeb8d5ef3d1b7dadf942928166c66e9fc8e1 Mon Sep 17 00:00:00 2001 From: David Lebee Date: Wed, 13 Feb 2019 21:27:09 -0600 Subject: [PATCH] don't use try since you want to register more than one service. --- .../ServiceCollectionExtensions.cs | 2 +- PoweredSoft.Data.MongoDB/ServiceCollectionExtensions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PoweredSoft.Data.EntityFrameworkCore/ServiceCollectionExtensions.cs b/PoweredSoft.Data.EntityFrameworkCore/ServiceCollectionExtensions.cs index 4fa9952..6be3f91 100644 --- a/PoweredSoft.Data.EntityFrameworkCore/ServiceCollectionExtensions.cs +++ b/PoweredSoft.Data.EntityFrameworkCore/ServiceCollectionExtensions.cs @@ -13,7 +13,7 @@ namespace PoweredSoft.Data.EntityFrameworkCore { services.AddPoweredSoftDataServices(); services.TryAddTransient(); - services.TryAddTransient(); + services.AddTransient(); return services; } } diff --git a/PoweredSoft.Data.MongoDB/ServiceCollectionExtensions.cs b/PoweredSoft.Data.MongoDB/ServiceCollectionExtensions.cs index 4b0c1e5..df78172 100644 --- a/PoweredSoft.Data.MongoDB/ServiceCollectionExtensions.cs +++ b/PoweredSoft.Data.MongoDB/ServiceCollectionExtensions.cs @@ -12,7 +12,7 @@ namespace PoweredSoft.Data.MongoDB public static IServiceCollection AddPoweredSoftMongoDBDataServices(this IServiceCollection services) { services.AddPoweredSoftDataServices(); - services.TryAddTransient(); + services.AddTransient(); return services; } }