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).
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 theIStartupFilter
from theIServiceCollection
, which is awkward. Instead, an overload should be added to .AddAspNetCore` which simplifies disabling request scoping (while the default still is to apply it).