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 2424using Microsoft . EntityFrameworkCore ;
2525using Microsoft . EntityFrameworkCore . Metadata ;
2626using Microsoft . Extensions . DependencyInjection ;
27+ using Microsoft . Extensions . DependencyInjection . Extensions ;
2728using Microsoft . Extensions . Logging ;
2829
2930namespace JsonApiDotNetCore . Configuration
@@ -212,7 +213,7 @@ private void RegisterImplementationForOpenInterfaces(HashSet<Type> openGenericIn
212213 {
213214 Type implementationType = openGenericInterface . GetGenericArguments ( ) . Length == 1 ? intImplementation : implementation ;
214215
215- _services . AddScoped ( openGenericInterface , implementationType ) ;
216+ _services . TryAddScoped ( openGenericInterface , implementationType ) ;
216217 }
217218 }
218219
You can’t perform that action at this time.
0 commit comments