Franz.Common.Http.MultiTenancy
2.3.1
dotnet add package Franz.Common.Http.MultiTenancy --version 2.3.1
NuGet\Install-Package Franz.Common.Http.MultiTenancy -Version 2.3.1
<PackageReference Include="Franz.Common.Http.MultiTenancy" Version="2.3.1" />
<PackageVersion Include="Franz.Common.Http.MultiTenancy" Version="2.3.1" />
<PackageReference Include="Franz.Common.Http.MultiTenancy" />
paket add Franz.Common.Http.MultiTenancy --version 2.3.1
#r "nuget: Franz.Common.Http.MultiTenancy, 2.3.1"
#:package Franz.Common.Http.MultiTenancy@2.3.1
#addin nuget:?package=Franz.Common.Http.MultiTenancy&version=2.3.1
#tool nuget:?package=Franz.Common.Http.MultiTenancy&version=2.3.1
Franz.Common.Http.MultiTenancy
HTTP, identity, and service integration for the Franz.Common framework on .NET 10.
Overview
The Franz.Common.Http.MultiTenancy package provides HTTP, identity, and service integration within Franz.Common. It is designed to compose with the rest of the framework rather than imposing unrelated infrastructure choices on every application.
Installation
dotnet add package Franz.Common.Http.MultiTenancy
Design principles
- Explicit composition: register only the capabilities the application needs.
- Clear boundaries: keep domain and application contracts independent from provider-specific infrastructure where the package's role permits it.
- Predictable behavior: make configuration, failure modes, and lifecycle ownership visible rather than relying on hidden conventions.
- Operational readiness: validate security, resilience, diagnostics, and compatibility for the actual deployment environment.
Usage and configuration
Follow the package-specific setup, configuration, and code examples below. Only configure external services when this package requires them, and keep secrets outside source control.
Package-specific guide
A library within the Franz Framework that extends multi-tenancy support for HTTP-based ASP.NET Core applications. This package provides tools for tenant-specific context management, dependency injection, and Swagger documentation enhancements, enabling seamless multi-tenant application development.
Features
- Tenant Context Management:
TenantContextAccessorandDomainContextAccessorfor managing tenant-specific information across HTTP requests.
- Swagger Documentation:
AddRequiredHeaderParameterfor including tenant-specific headers in Swagger documentation.
- Dependency Injection:
ServiceCollectionExtensionsfor integrating multi-tenancy into your services and application pipeline.
Version Information
Current Version: v2.3.0
- Part of the private Franz Framework ecosystem.
Dependencies
This package relies on:
- Microsoft.AspNetCore.Mvc.Core (2.2.5): Core MVC functionality for tenant-based HTTP applications.
- Swashbuckle.AspNetCore.SwaggerGen (6.5.0): For Swagger generation with multi-tenancy support.
- Franz.Common.MultiTenancy: Core multi-tenancy utilities and patterns.
- Franz.Common.Http.Headers: Provides header utilities for tenant-specific HTTP headers.
- Franz.Common.Http: Core HTTP utilities for multi-tenant scenarios.
- Franz.Common.Headers: Core header management utilities.
Installation
From Private Azure Feed
Since this package is hosted privately, configure your NuGet client:
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install the package:
dotnet add package Franz.Common.Http.MultiTenancy
Usage
1. Register Multi-Tenancy Services
Use ServiceCollectionExtensions to register tenant-specific services:
using Franz.Common.Http.MultiTenancy.Extensions;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMultiTenancy(); // Registers multi-tenancy utilities and services
}
}
2. Access Tenant Context
Access tenant-specific information using TenantContextAccessor or DomainContextAccessor:
using Franz.Common.Http.MultiTenancy;
public class MyService
{
private readonly TenantContextAccessor _tenantContextAccessor;
public MyService(TenantContextAccessor tenantContextAccessor)
{
_tenantContextAccessor = tenantContextAccessor;
}
public string GetTenantId()
{
return _tenantContextAccessor.Tenant?.Id;
}
}
3. Enhance Swagger Documentation
Use AddRequiredHeaderParameter to include tenant-specific headers in Swagger UI:
using Franz.Common.Http.MultiTenancy.Documentation;
services.AddSwaggerGen(options =>
{
options.OperationFilter<AddRequiredHeaderParameter>();
});
This ensures tenant headers are explicitly documented in API specifications.
Integration with Franz Framework
The Franz.Common.Http.MultiTenancy package integrates seamlessly with:
- Franz.Common.MultiTenancy: Provides foundational multi-tenancy utilities.
- Franz.Common.Http.Headers: Enhances tenant-specific header handling.
- Franz.Common.Http: Enables tenant-aware HTTP services.
- Franz.Common.Headers: Provides shared header utilities for HTTP operations.
Ensure these dependencies are installed to fully leverage the library's capabilities.
Contributing
This package is part of a private framework. Contributions are limited to the internal development team. If you have access, follow these steps:
- Clone the repository. @ https://github.com/bestacio89/Franz.Common/
- Create a feature branch.
- Submit a pull request for review.
License
This library is licensed under the MIT License. See the LICENSE file for more details.
Changelog
Version 1.2.65
- Upgrade version to .net 9
Version 1.3
- Upgraded to .NET 9.0.8
- Added new features and improvements
- Separated business concepts from mediator concepts
- Now compatible with both the in-house mediator and MediatR
Version 1.3.1
Introduced tenant resolution pipeline (DefaultTenantResolutionPipeline) to orchestrate multiple strategies.
Added resolvers for different multi-tenancy strategies:
- HeaderTenantResolver (resolves tenant from request headers).
- HostTenantResolver (resolves tenant from host/subdomain).
- QueryStringTenantResolver (resolves tenant from query string).
- JwtClaimTenantResolver (resolves tenant from JWT claims).
Implemented TenantResolutionMiddleware for resolving the tenant once per request and storing it in context.
Enhanced TenantContextAccessor and DomainContextAccessor to use HttpContext.Items for request-scoped tenant/domain storage.
Added DI extension methods (AddFranzMultiTenancy) for easy registration of multi-tenancy services.
Added middleware extension (UseFranzMultiTenancy) for seamless integration into the ASP.NET Core pipeline.
Improved Swagger integration by supporting tenant-specific headers in documentation via AddRequiredHeaderParameter.
Laid foundation for tenant-aware services (DbContexts, caching, feature flags) by standardizing tenant resolution across HTTP requests.
Version 1.6.20
- Updated to .NET 10.0
v2.0.1 – Internal Modernization
- Messaging and infrastructure refactored for async, thread-safety, and modern .NET 10 patterns.
- All APIs remain fully backward compatible.
- Tests, listeners, and pipeline components modernized.
Dependency maintenance — October 2026
This project's dependency references were reviewed and updated as part of the repository-wide .NET 10 maintenance pass. The intended target framework and public API remain unchanged. Verify the resolved direct and transitive dependency graph through the repository's dependency validation workflow before publishing. See the central dependency upgrade record.
| Product | Versions 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. |
-
net10.0
- Franz.Common.Headers (>= 2.3.1)
- Franz.Common.Http (>= 2.3.1)
- Franz.Common.Http.Headers (>= 2.3.1)
- Franz.Common.MultiTenancy (>= 2.3.1)
- Swashbuckle.AspNetCore.SwaggerGen (>= 10.2.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Franz.Common.Http.MultiTenancy:
| Package | Downloads |
|---|---|
|
Franz.Common.MongoDB
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Http.Bootstrap
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.1 | 76 | 10/26/2026 |
| 2.3.0 | 212 | 7/21/2026 |
| 2.2.19 | 170 | 7/19/2026 |
| 2.2.18 | 164 | 7/19/2026 |
| 2.2.17 | 258 | 7/12/2026 |
| 2.2.16 | 177 | 7/2/2026 |
| 2.2.15 | 173 | 6/29/2026 |
| 2.2.14 | 179 | 6/29/2026 |
| 2.2.13 | 169 | 6/29/2026 |
| 2.2.12 | 166 | 6/28/2026 |
| 2.2.11 | 163 | 6/28/2026 |
| 2.2.10 | 174 | 6/28/2026 |
| 2.2.9 | 173 | 6/28/2026 |
| 2.2.8 | 175 | 6/28/2026 |
| 2.2.7 | 174 | 6/7/2026 |
| 2.2.6 | 183 | 6/6/2026 |
| 2.2.5 | 176 | 6/4/2026 |
| 2.2.4 | 178 | 6/3/2026 |
| 2.2.3 | 160 | 6/2/2026 |
| 2.2.2 | 178 | 6/2/2026 |