Franz.Common.MultiTenancy 3.0.0

dotnet add package Franz.Common.MultiTenancy --version 3.0.0
                    
NuGet\Install-Package Franz.Common.MultiTenancy -Version 3.0.0
                    
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="Franz.Common.MultiTenancy" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.MultiTenancy" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.MultiTenancy" />
                    
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 Franz.Common.MultiTenancy --version 3.0.0
                    
#r "nuget: Franz.Common.MultiTenancy, 3.0.0"
                    
#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 Franz.Common.MultiTenancy@3.0.0
                    
#: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=Franz.Common.MultiTenancy&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.MultiTenancy&version=3.0.0
                    
Install as a Cake Tool

Franz.Common.MultiTenancy

Provider-neutral contracts and scoped execution context for tenant and domain isolation.

Overview

This package defines tenant/domain identity, tenant persistence contracts, validation contracts, and the immutable execution context shared by HTTP, messaging, gRPC, and persistence integrations. It does not choose how a tenant is resolved from an HTTP request or broker message; boundary-specific packages implement those integrations.

Installation

dotnet add package Franz.Common.MultiTenancy

Core contracts

  • TenantInfo: tenant identity, status, and associated domains.
  • ITenantStore: asynchronous tenant lookup by ID or host, enumeration, and existence checks.
  • ITenantResolver: boundary-specific tenant resolution strategy.
  • ITenantValidator: application validation of a resolved tenant.
  • ITenantExecutionContextAccessor: scoped access to the validated execution context.
  • ITenantContextAccessor and IDomainContextAccessor: tenant/domain identity accessors.
  • ITenantEntity and IGlobalEntity: explicit ownership classifications for persistence models.

Validated execution context

A TenantExecutionContext can be created only for a non-empty, active tenant. It records the tenant, optional verified domain, resolution source, and resolution timestamp. The scoped ScopedTenantExecutionContextAccessor allows one initialization per execution scope and exposes an explicit Clear() operation.

The context is not a mutable request DTO. Initialize it only after resolution, status validation, and authorization have succeeded. Clear it when the request/message execution scope ends.

Boundary integrations

Use the appropriate package for each boundary:

  • Franz.Common.Http.MultiTenancy: HTTP tenant resolution and membership authorization.
  • Franz.Common.Messaging.MultiTenancy: message-header extraction, producer authorization, and message-scoped execution.
  • Franz.Common.Grpc: gRPC client/server tenant propagation and resolution.
  • Franz.Common.EntityFramework: tenant-aware query filters and write enforcement for relational EF contexts.

Persistence ownership

Tenant-owned entities implement ITenantEntity and expose a mapped Guid TenantId. Data intentionally shared across tenants implements IGlobalEntity. When multi-tenancy is enabled with a shared relational database, the EF integration requires each persisted Franz entity to declare exactly one of these ownership classifications.

Do not treat a tenant ID from an untrusted header or claim as proof of membership. Boundary authorization must validate the caller or transport identity independently.

License

MIT. See the repository LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.
  • net10.0

    • No dependencies.

NuGet packages (12)

Showing the top 5 NuGet packages that depend on Franz.Common.MultiTenancy:

Package Downloads
Franz.Common.EntityFramework

Shared utility library for the Franz Framework.

Franz.Common.Http.MultiTenancy

Shared utility library for the Franz Framework.

Franz.Common.EntityFramework.SQLServer

Shared utility library for the Franz Framework.

Franz.Common.Messaging.MultiTenancy

Shared utility library for the Franz Framework.

Franz.Common.EntityFramework.PostGres

Shared utility library for the Franz Framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 231 11/10/2026
2.3.4 649 11/1/2026
2.3.3 475 10/28/2026
2.3.2 264 10/27/2026
2.3.1 330 10/26/2026
2.3.0 478 7/21/2026
2.2.19 301 7/19/2026
2.2.18 307 7/19/2026
2.2.17 645 7/12/2026
2.2.16 315 7/2/2026
2.2.15 316 6/29/2026
2.2.14 323 6/29/2026
2.2.13 315 6/29/2026
2.2.12 314 6/28/2026
2.2.11 311 6/28/2026
2.2.10 317 6/28/2026
2.2.9 323 6/28/2026
2.2.8 314 6/28/2026
2.2.7 315 6/7/2026
2.2.6 318 6/6/2026
Loading failed