Click or drag to resize

AutofacMultitenantWebHostBuilderExtensionsUseAutofacMultitenantRequestServices Method

Adds the multitenant Autofac request services middleware, which ensures request lifetimes spawn from the container rather than a pre-resolved tenant lifetime scope. This allows tenant identification to occur at the time of request scope generation.

Namespace:  Microsoft.AspNetCore.Hosting
Assembly:  Autofac.Integration.AspNetCore.Multitenant (in Autofac.Integration.AspNetCore.Multitenant.dll) Version: 4.0.1+b60273783824e015af81d477fca338eb146578d7
Syntax
public static IWebHostBuilder UseAutofacMultitenantRequestServices(
	this IWebHostBuilder builder
)

Parameters

builder
Type: IWebHostBuilder
The IWebHostBuilder instance being configured.

Return Value

Type: IWebHostBuilder
The existing IWebHostBuilder instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IWebHostBuilder. 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).
Exceptions
ExceptionCondition
ArgumentNullException Thrown if builder is .
See Also