SimpleInjectorAspNetCoreIntegrationExtensionsUseSimpleInjectorAspNetRequestScoping Method (IApplicationBuilder, Container)

Simple Injector

Note: This API is now obsolete.

Wraps ASP.NET requests in an AsyncScopedLifestyle.

Namespace:  SimpleInjector
Assembly:  SimpleInjector.Integration.AspNetCore (in SimpleInjector.Integration.AspNetCore.dll) Version: 4.1.0-alpha1

[ObsoleteAttribute("UseSimpleInjectorAspNetRequestScoping(IApplicationBuilder, Container) is deprecated. Please use UseSimpleInjectorAspNetRequestScoping(IServiceCollection, Container) instead. This new overload can be called from within the ConfigureServices method of the Startup class. See for more information.", 
public static void UseSimpleInjectorAspNetRequestScoping(
	this IApplicationBuilder applicationBuilder,
	Container container


Type: IApplicationBuilder
The ASP.NET application builder instance that references all framework components.
Type: SimpleInjectorContainer
The container.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IApplicationBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also