Skip to content

Commit 9c1f245

Browse files
authored
Merge pull request #345 from json-api-dotnet/fix/#339
fix(ServiceCollectionExtensions): correct service scoping
2 parents 404231b + 2ed4413 commit 9c1f245

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ private static void AddOperationServices(IServiceCollection services)
159159
services.AddScoped(typeof(IUpdateOpProcessor<>), typeof(UpdateOpProcessor<>));
160160
services.AddScoped(typeof(IUpdateOpProcessor<,>), typeof(UpdateOpProcessor<,>));
161161

162-
services.AddSingleton<IOperationProcessorResolver, OperationProcessorResolver>();
163-
services.AddSingleton<IGenericProcessorFactory, GenericProcessorFactory>();
162+
services.AddScoped<IOperationProcessorResolver, OperationProcessorResolver>();
164163
}
165164

166165
public static void SerializeAsJsonApi(this MvcOptions options, JsonApiOptions jsonApiOptions)

0 commit comments

Comments
 (0)