Ledon.MultiTenancy
0.0.1
dotnet add package Ledon.MultiTenancy --version 0.0.1
NuGet\Install-Package Ledon.MultiTenancy -Version 0.0.1
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="Ledon.MultiTenancy" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ledon.MultiTenancy" Version="0.0.1" />
<PackageReference Include="Ledon.MultiTenancy" />
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 Ledon.MultiTenancy --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ledon.MultiTenancy, 0.0.1"
#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 Ledon.MultiTenancy@0.0.1
#: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=Ledon.MultiTenancy&version=0.0.1
#tool nuget:?package=Ledon.MultiTenancy&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ledon.MultiTenancy
Ledon Framework 的多租户:租户解析(请求头 / 查询串 / 用户声明 / Host 子域名)+ 后台任务环境穿透。
builder.Services.AddLedonMultiTenancy(o =>
{
o.Source = TenantSource.Host; // tenant-a.example.com → tenant-a
o.HostSuffix = ".example.com";
});
app.UseLedonMultiTenancy();
app.MapGet("/whoami", (ITenantContext tenant) => new { tenant.TenantId, tenant.IsMultiTenant });
未解析到租户标识时按单租户处理(TenantId == null)。后台任务经 AsyncLocal 环境租户穿透(入队捕获、执行恢复)。
数据隔离约定显式:框架提供上下文与解析,不提供隐式查询过滤——每个查询显式带租户条件(db.Orders.Where(o => o.TenantId == tenant.TenantId)),避免隐式过滤的意外。
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Ledon.Caching (>= 0.0.1)
- Ledon.Module (>= 0.0.1)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.13)
- Microsoft.Extensions.Caching.Hybrid (>= 10.11.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 10.0.13)
- Microsoft.Extensions.DependencyModel (>= 10.0.13)
- StackExchange.Redis (>= 2.7.27)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Ledon.MultiTenancy:
| Package | Downloads |
|---|---|
|
Ledon.MultiTenancy.Management
.NET 10 模块化 Web 开发框架:解耦优先,自动发现与自动注入,能力按需引入。 |
|
|
Ledon.BlobStorage
.NET 10 模块化 Web 开发框架:解耦优先,自动发现与自动注入,能力按需引入。 |
|
|
Ledon.FeatureManagement
.NET 10 模块化 Web 开发框架:解耦优先,自动发现与自动注入,能力按需引入。 |
|
|
Ledon.Data.MultiTenancy
.NET 10 模块化 Web 开发框架:解耦优先,自动发现与自动注入,能力按需引入。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1 | 51 | 10/28/2026 |