We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6540c12 commit 7c30e4fCopy full SHA for 7c30e4f
src/JsonApiDotNetCore/Configuration/JsonApiApplicationBuilder.cs
@@ -24,6 +24,7 @@
24
using Microsoft.EntityFrameworkCore;
25
using Microsoft.EntityFrameworkCore.Metadata;
26
using Microsoft.Extensions.DependencyInjection;
27
+using Microsoft.Extensions.DependencyInjection.Extensions;
28
using Microsoft.Extensions.Logging;
29
30
namespace JsonApiDotNetCore.Configuration
@@ -212,7 +213,7 @@ private void RegisterImplementationForOpenInterfaces(HashSet<Type> openGenericIn
212
213
{
214
Type implementationType = openGenericInterface.GetGenericArguments().Length == 1 ? intImplementation : implementation;
215
- _services.AddScoped(openGenericInterface, implementationType);
216
+ _services.TryAddScoped(openGenericInterface, implementationType);
217
}
218
219
0 commit comments