File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/JsonApiDotNetCore/Configuration Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 24
24
using Microsoft . EntityFrameworkCore ;
25
25
using Microsoft . EntityFrameworkCore . Metadata ;
26
26
using Microsoft . Extensions . DependencyInjection ;
27
+ using Microsoft . Extensions . DependencyInjection . Extensions ;
27
28
using Microsoft . Extensions . Logging ;
28
29
29
30
namespace JsonApiDotNetCore . Configuration
@@ -212,7 +213,7 @@ private void RegisterImplementationForOpenInterfaces(HashSet<Type> openGenericIn
212
213
{
213
214
Type implementationType = openGenericInterface . GetGenericArguments ( ) . Length == 1 ? intImplementation : implementation ;
214
215
215
- _services . AddScoped ( openGenericInterface , implementationType ) ;
216
+ _services . TryAddScoped ( openGenericInterface , implementationType ) ;
216
217
}
217
218
}
218
219
You can’t perform that action at this time.
0 commit comments