Autofac.Multitenant 8.0.3

Prefix Reserved
dotnet add package Autofac.Multitenant --version 8.0.3                
NuGet\Install-Package Autofac.Multitenant -Version 8.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Autofac.Multitenant" Version="8.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Autofac.Multitenant --version 8.0.3                
#r "nuget: Autofac.Multitenant, 8.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Autofac.Multitenant as a Cake Addin
#addin nuget:?package=Autofac.Multitenant&version=8.0.3

// Install Autofac.Multitenant as a Cake Tool
#tool nuget:?package=Autofac.Multitenant&version=8.0.3                


Multitenant application support for Autofac IoC.

Build status codecov

Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.

BREAKING CHANGE: As of v4.0.0, the Autofac.Extras.Multitenant package is Autofac.Multitenant.

Quick Start

// First, create your application-level defaults using a standard
// ContainerBuilder, just as you are used to.
var builder = new ContainerBuilder();
var appContainer = builder.Build();

// Once you've built the application-level default container, you
// need to create a tenant identification strategy that implements
// ITenantIdentificationStrategy. This is how the container will
// figure out which tenant is acting and needs dependencies resolved.
var tenantIdentifier = new MyTenantIdentificationStrategy();

// Now create the multitenant container using the application
// container and the tenant identification strategy.
var mtc = new MultitenantContainer(tenantIdentifier, appContainer);

// Configure the overrides for each tenant by passing in the tenant ID
// and a lambda that takes a ContainerBuilder.
  b => b.RegisterType<Tenant1Dependency>()
  b => b.RegisterType<Tenant2Dependency>()

// Now you can use the multitenant container to resolve instances.

Check out the documentation for more usage details.

Get Help

Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Autofac.Multitenant:

Package Downloads

Multitenant Autofac container integration support for ASP.NET Core.


Multitenant applications allow individual tenants to override dependencies rather than having a simple root container for everyone. This extension provides support for an application container and tenant-specific overrides using Autofac when hosting WCF services.


Core assembly for my project.


Core assembly for MVC project.


Core assembly for WebApi project.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Autofac.Multitenant:

Repository Stars
Example projects that consume and demonstrate Autofac IoC functionality and integration
YC. Boilerplate is a set of loose coupling, flexible combination, complete functions, convenient development, and reduces the workload of development.
Enables multitenant dependency injection support for ASP.NET Core.
Version Downloads Last updated
8.0.3 19,799 4/1/2024
8.0.2 43,018 3/12/2024
8.0.1 43,574 1/28/2024
8.0.0 2,955 1/18/2024
7.0.1 77,587 8/24/2023
7.0.0 216,283 3/8/2023
6.0.0 1,684,445 9/28/2020
5.0.1 416,629 4/7/2020
5.0.0 269,766 1/28/2020
4.2.0 597,041 8/28/2017
4.1.0 4,620 8/16/2017
4.0.0 248,944 8/9/2016
4.0.0-rc3-226 1,051 6/28/2016
4.0.0-beta8-219 1,952 9/10/2015
4.0.0-beta8-216 996 9/9/2015
4.0.0-beta7-222 1,141 9/11/2015