Substantive.AspNetCore.MultiTenant 9.17.24-build20260204r1

This package provides a standardized way to configure Finbuckle.MultiTenant for ASP.NET Core applications, with first-class support for Razor Pages, multiple tenant stores, and pluggable tenant resolution strategies.

A. Installation

1. Install the package

Install the package via NuGet or update directly in the .csproj file.

<PackageReference Include="Substantive.AspNetCore.MultiTenant" Version="1.*" />

2. Add configuration

Add the configuration below to the appsettings.json or to the configuration provider you are using.

Configure MultiTenantOptions using appsettings.json (or any other configuration provider).

Key settings:

  • Strategy – Tenant resolution strategy (Header, Route, or Host)
  • TenantStrategyParameter – Header name, route parameter, or host token depending on the strategy
  • EndpointTemplate – Required only for HTTP remote store
  • DefaultTenantInfo – Optional fallback tenant (not recommended for production)
{
   "MultiTenantOptions": {
     "Strategy": "Route",
     "TenantStrategyParameter": "tenant",
     "EndpointTemplate": "https://tenants.example.com/api/tenants/{tenantId}",
     "DefaultTenantInfo": {
       "Id": "00000000-0000-0000-0000-000000000001",
       "Identifier": "default",
       "Name": "Default Tenant"
     }
   }
}

3. Configure services

Configure the service and configuration into the service collection.

Bind options and register the appropriate tenant store.

builder.Services.AddMultiTenantWithEFCoreStore<TenantStoreDbContext, TenantInfo>(options =>
{
    builder.Configuration.GetSection(nameof(MultiTenantOptions)).Bind(options);
});

B. Choosing the correct store

Store Recommended use cases
In-memory Tests, local development, demos
EF Core Monolithic apps, Razor Pages, single database
HTTP remote Microservices, shared tenant catalog

C. Tenant resolution strategies

Strategy When to use
Header APIs, SPA backends
Route Razor Pages (for example: /{tenant}/Index)
Host SaaS with subdomains

D. Usage

B. Usages

Inject ITenantInfo or IMultiTenantContextAccessor<TenantInfo> where needed.

private readonly ITenantInfo tenant;

public IndexModel(ITenantInfo tenant)
{
    this.tenant = tenant;
}

E. Notes and best practices

  • Avoid DefaultTenantInfo in production environments
  • Do not register multiple tenant stores in the same application
  • Centralize tenant lifecycle management when using the HTTP remote store

Showing the top 20 packages that depend on Substantive.AspNetCore.MultiTenant.

Packages Downloads
Substantive.AspNetCore
Package Description
10
Substantive.AspNetCore
Package Description
12
Substantive.AspNetCore
Package Description
43
Substantive.AspNetCore
Package Description
91
Substantive.AspNetCore
Substantive ASP.NET Core package.
13
Substantive.AspNetCore
Substantive ASP.NET Core package.
19
Substantive.AspNetCore
Substantive ASP.NET Core package.
20
Substantive.AspNetCore
Substantive ASP.NET Core package.
21
Substantive.AspNetCore
Substantive ASP.NET Core package.
22
Substantive.AspNetCore
Substantive ASP.NET Core package.
24
Substantive.AspNetCore
Substantive ASP.NET Core package.
27
Substantive.AspNetCore
Substantive untitled internal package.
14
Substantive.AspNetCore
Substantive untitled internal package.
29
Substantive.AspNetCore
Substantive untitled internal package.
31
Substantive.AspNetCore
Substantive untitled internal package.
52
Substantive.Foundation.Backends
A metapackage contains all Substantive backend building blocks.
14
Substantive.Foundation.Backends
A metapackage contains all Substantive backend building blocks.
16

Version Downloads Last updated
9.17.28-build20260331R1 4 03/31/2026
9.17.27-build20260306R1 19 03/06/2026
9.17.26-build20260211R1 6 02/11/2026
9.17.25-build20260210R1 3 02/10/2026
9.17.24-build20260209R1 4 02/09/2026
9.17.24-build20260204R1 5 02/04/2026
9.17.23-build20260204R1 2 02/04/2026
9.17.22-build20260204R1 1 02/04/2026
9.17.21-build20260204R2 1 02/04/2026
9.17.21-build20260204R1 2 02/04/2026
9.17.20-build20260203R1 4 02/03/2026
9.17.19-build20260130R1 9 01/30/2026
9.17.18-build20260129R1 20 01/29/2026
9.17.17-build20260129R1 24 01/29/2026
9.17.17-build20260128R1 22 01/28/2026
9.17.16-build20260127R2 23 01/27/2026
9.17.16-build20260123R1 5 01/23/2026
9.17.15-build20260122R1 7 01/22/2026
9.17.14-build20260122R2 7 01/22/2026
9.17.14-build20260122R1 3 01/22/2026
9.17.14-build20260121R1 3 01/21/2026
9.17.13-build20260121R1 3 01/21/2026
9.17.12-build20260120R1 7 01/20/2026
9.17.11-build20260120R1 6 01/20/2026
9.17.10-build20260120R1 5 01/20/2026
9.17.9-build20260119R1 4 01/19/2026
9.17.8-build20260119R1 3 01/19/2026
9.17.7-build20260115R1 3 01/15/2026
9.17.6-build20260115R1 2 01/15/2026
9.17.5-build20260119R1 3 01/19/2026
9.17.5-build20260115R1 3 01/15/2026
9.17.4-build20260115R1 5 01/15/2026
9.17.3-build20260115R1 2 01/15/2026
9.17.2-build20260115R1 2 01/15/2026
9.17.2-build20260113R1 28 01/13/2026
9.17.1-build20260113R2 3 01/13/2026
9.17.1-build20260109R2 2 01/09/2026
9.17.1-build20260106R2 5 01/06/2026
9.17.1-build20251231R2 2 12/31/2025
9.17.1-build20251230R2 11 12/30/2025
9.17.1-build20251230R1 2 12/30/2025
9.17.0-build20251229R2 6 12/29/2025
9.17.0-build20251229R1 2 12/29/2025
9.17.0-build20251226R1 13 12/26/2025
9.17.0-build20251225R1 4 12/25/2025
9.16.0-build20251224R1 9 12/24/2025
9.15.3-build20251224R1 3 12/24/2025
9.15.2-build20251224R1 2 12/24/2025
9.15.1-build20251224R1 2 12/24/2025
9.15.0-build20251224R1 2 12/24/2025
9.14.4-build20251224R1 2 12/24/2025
9.14.3-build20251224R4 2 12/24/2025
9.14.2-build20251224R1 2 12/24/2025
9.14.1-build20251224R1 2 12/24/2025
9.14.0-build20251223R1 5 12/23/2025
9.3.0-build20251224R4 2 12/24/2025
9.3.0-build20251223R4 2 12/23/2025
9.3.0-build20251223R3 5 12/23/2025
9.3.0-build20251223R2 3 12/23/2025
9.3.0-build20251222R2 4 12/22/2025
9.3.0-build20251222R1 3 12/22/2025
9.2.0-build20251222R2 4 12/22/2025
9.2.0-build20251222R1 4 12/22/2025
9.1.0-build20251218R1 3 12/18/2025
9.1.0-build20251217R2 4 12/17/2025
9.1.0-build20251217R1 7 12/17/2025
9.1.0-build20251216R2 8 12/16/2025
9.1.0-build20251216R1 5 12/16/2025
9.1.0-build20251215R1 6 12/15/2025
9.1.0-build20251212R1 8 12/12/2025
9.1.0-build20251211R1 2 12/11/2025
9.1.0-build20251210R1 5 12/10/2025
9.1.0-build20251202R2 11 12/02/2025
9.1.0-build20251202R1 7 12/02/2025
9.0.5-build20251117R1 2 11/17/2025
9.0.5-build20251110R1 52 11/10/2025
9.0.5-build20251103R1 7 11/03/2025
9.0.5-build20251030R1 6 10/30/2025
9.0.5-build20251028R1 4 10/28/2025
9.0.5-build20251016R1 2 10/16/2025
9.0.5-build20250925R2 9 09/25/2025
9.0.5-build20250925R1 3 09/25/2025
9.0.5-build20250924R1 3 09/24/2025
9.0.5-build20250910R1 2 09/10/2025
9.0.5-build20250908R1 32 09/08/2025
9.0.5-build20250905R2 6 09/05/2025
9.0.5-build20250905R1 7 09/05/2025
9.0.5-build20250827R1 2 08/27/2025
9.0.5-build20250825R1 29 08/25/2025
9.0.5-build20250824R1 2 08/24/2025
9.0.5-build20250822R1 3 08/22/2025
9.0.5-build20250821R1 4 08/21/2025
9.0.4-build20250821R1 3 08/21/2025
9.0.3-build20250821R1 3 08/21/2025
9.0.2-build20250821R1 3 08/21/2025
9.0.1-build20250821R1 3 08/21/2025
9.0.0 12 08/16/2025
9.0.0-build20250821R3 3 08/21/2025
9.0.0-build20250821R2 3 08/21/2025
9.0.0-build20250821R1 3 08/21/2025
9.0.0-build20250818R2 7 08/18/2025
9.0.0-build20250818R1 4 08/18/2025
9.0.0-build20250815R1 4 08/15/2025
9.0.0-build20250814R1 3 08/14/2025
9.0.0-build20250813R1 5 08/13/2025
9.0.0-build20250722R3 87 07/22/2025
9.0.0-build20250714R3 41 07/14/2025
9.0.0-build20250714R2 4 07/14/2025
9.0.0-build20250714R1 3 07/14/2025
9.0.0-build20250710R1 11 07/10/2025
9.0.0-build20250708R1 3 07/08/2025
9.0.0-build20250707R2 11 07/07/2025
9.0.0-build20250707R1 4 07/07/2025
9.0.0-build20250629R1 10 06/29/2025
9.0.0-build20250626R2 6 06/26/2025
9.0.0-build20250626R1 5 06/26/2025
9.0.0-build20250623R1 8 06/23/2025
9.0.0-build20250621R1 13 06/21/2025
1.1.0-build20251224R1 2 12/24/2025