simpleinjector / SimpleInjector.Integration.AspNetCore

MIT License
2 stars 3 forks source link

Allow use of request scoping to be configured when calling .AddAspNetCore #12

Open dotnetjunkie opened 3 years ago

dotnetjunkie commented 3 years ago

Currently enabling ASP.NET Core request scoping is an all-or-nothing approach. When .AddAspNetCore() is called, request scoping is applied and disabling it again is only possible by removing the IStartupFilter from the IServiceCollection, which is awkward. Instead, an overload should be added to .AddAspNetCore` which simplifies disabling request scoping (while the default still is to apply it).