TCIS.MultiTenancy.AspNetCore 1.0.0-rc.9

This is a prerelease version of TCIS.MultiTenancy.AspNetCore.
dotnet add package TCIS.MultiTenancy.AspNetCore --version 1.0.0-rc.9
                    
NuGet\Install-Package TCIS.MultiTenancy.AspNetCore -Version 1.0.0-rc.9
                    
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="TCIS.MultiTenancy.AspNetCore" Version="1.0.0-rc.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCIS.MultiTenancy.AspNetCore" Version="1.0.0-rc.9" />
                    
Directory.Packages.props
<PackageReference Include="TCIS.MultiTenancy.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TCIS.MultiTenancy.AspNetCore --version 1.0.0-rc.9
                    
#r "nuget: TCIS.MultiTenancy.AspNetCore, 1.0.0-rc.9"
                    
#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.
#:package TCIS.MultiTenancy.AspNetCore@1.0.0-rc.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TCIS.MultiTenancy.AspNetCore&version=1.0.0-rc.9&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TCIS.MultiTenancy.AspNetCore&version=1.0.0-rc.9&prerelease
                    
Install as a Cake Tool

TCIS.MultiTenancy.AspNetCore

The library providing extension components and Middleware to support Multi-Tenancy architecture in ASP.NET Core applications within the TCIS ecosystem, built upon Finbuckle.MultiTenant.

📦 Installation

dotnet add package TCIS.MultiTenancy.AspNetCore

🚀 Configuration and Registration (Program.cs)

Register Multi-Tenancy services and Resolution Strategies through the provided extension methods.

using TCIS.MultiTenancy.AspNetCore.Extensions;
using TCIS.MultiTenancy.Abstractions;

var builder = WebApplication.CreateBuilder(args);

// Register Multi-Tenancy services
builder.Services.AddMultiTenant<TenantInfo>()
    // Resolve Tenant via HTTP Header (default key is "__tenant__")
    .WithHeaderStrategy() 
    // Or resolve by Host
    .WithHostStrategy()
    // Or resolve by Claims
    .WithClaimStrategy("tenant_id")
    // Configure to throw an error or redirect if the Tenant is not found
    .ShortCircuitWhenTenantNotResolved(); 

var app = builder.Build();

// Use the Multi-Tenancy Middleware in the Pipeline (after Routing, before Auth)
app.UseTMultiTenant();

app.Run();

💡 Usage

The library provides flexible, out-of-the-box resolution strategies:

  1. HeaderStrategy: WithHeaderStrategy(string tenantKey = "__tenant__")
    • Highly suitable for Web APIs and gRPC when the client can actively pass a Header identifying the Tenant.
  2. HostStrategy: WithHostStrategy(string template = "__tenant__.*")
    • Used for subdomain scenarios such as tenant1.domain.com.
  3. ClaimStrategy: WithClaimStrategy(string claimType)
    • Automatically resolves the Tenant through the JWT Claims of the currently logged-in User.

Note:

  • app.UseTMultiTenant() is mandatory in the request pipeline to resolve the Tenant. This middleware replaces standard middlewares to ensure optimal compatibility with the TCIS context system.
Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.9 25 7/21/2026
1.0.0-rc.8 19 7/21/2026
1.0.0-rc.7 43 7/17/2026
1.0.0-rc.6 57 7/7/2026
1.0.0-rc.5 57 7/7/2026
1.0.0-rc.4 59 6/24/2026
1.0.0-rc.2 60 5/12/2026
1.0.0-rc.1 61 5/12/2026