Senparc.Xncf.Tenant 0.15.14

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

Senparc.Xncf.Tenant

Senparc.Xncf.Tenant provides NCF multi-tenant persistence, request resolution, caching, and service integration.

Features

  • Persists TenantInfo records through a tenant database context and repository.
  • Resolves the current request tenant through middleware.
  • Provides TenantInfoService, tenant DTO mapping, and cached full-tenant information.
  • Supports provider-specific contexts and NCF multi-database migrations.

Installation

<PackageReference Include="Senparc.Xncf.Tenant" Version="0.26.0-preview3" />

Key API

  • Register.AddMultiTenant(...) registers tenant services and middleware dependencies.
  • TenantMiddleware resolves tenant context for an HTTP request.
  • TenantInfoService.GetRequestTenantInfo(...) and SetTenantInfo(...) read/update tenant information.
  • TenantInfoRepository and FullTenantInfoCache provide persistence and cached lookup.
  • SenparcEntitiesMultiTenant is the multi-tenant database context.

Choose and document the tenant-resolution source, fail closed when a tenant cannot be resolved, and ensure every business query applies the resolved tenant boundary.

When using TenantRule.RequestHeader, anonymous requests can select a tenant by sending TenantKey. Requests authenticated with the NCF admin cookie must present the same tenant key as their authenticated TenantKey claim; accounts without a tenant claim cannot switch tenants. When the header is absent, a signed-in tenant user retains the tenant from their cookie claim rather than falling back to the default tenant. Requests with an Authorization header and TenantKey are rejected until their authentication scheme is explicitly bound to a tenant. A trusted proxy should strip client-supplied tenant headers if it injects its own.

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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Senparc.Xncf.Tenant:

Package Downloads
Senparc.Xncf.PromptRange

你的提示词(Prompt)训练场

Senparc.Xncf.AIAgentsHub

人工智能代理枢纽模块

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.15.14 109 10/4/2026
0.15.10 134 9/18/2026
0.15.9 119 9/16/2026
0.15.8 171 8/29/2026
0.15.7 255 8/23/2026
0.15.6-preview8 163 8/14/2026
0.15.5-preview7 153 8/12/2026
0.15.4-preview6 158 8/8/2026
0.15.3-preview5 162 8/3/2026
0.15.2-preview4 167 7/31/2026
0.15.1-preview3 148 7/28/2026
0.15.0-preview2 152 7/26/2026
0.14.1-preview1 245 6/17/2026
0.13.16.1-preview 221 5/9/2026
0.13.15-preview.1 126 2/13/2026
0.13.14.4-preview 163 12/28/2025
0.13.14.2-preview 147 12/28/2025
0.13.14-preview.1 228 11/1/2025
0.13.12.6-preview1 305 8/20/2025
0.13.2-preview 133 6/16/2026
Loading failed

[2026-10-02] 基于现有启用租户缓存提供类型化后台租户信息
[2026-10-01] 租户缓存查询复用现有 TenantInfoRepository,保留独立租户数据库启动机制
[2026-10-01] v0.15.12 移除租户缓存刷新时的共享过滤器状态切换
1、TenantInfo 全局注册表查询直接依赖 IIgnoreMulitTenant,避免并发请求观察到临时禁用的租户过滤状态
[2026-10-01] v0.15.11 加固 RequestHeader 模式租户授权
1、已认证管理员仅可使用与可信租户声明一致的 TenantKey
2、无请求头时保留已认证用户的租户上下文,避免回退到默认租户
v0.1.0 创世
v0.2.2 添加 services.AddMultiTenant(); 等注册过程到此模块
v0.3.3.1 添加 Oracle 数据库迁移代码
v0.6.0 完善租户启用过滤机制
[2024-09-10] v0.11.4-preview1 升级缓存基础库
[2024-10-09] v0.11.6-preview1 升级基础库
[2024-10-16] v0.11.7-preview1 添加 Service 对 PagedList 对象快速 Mapping 到 DTO 对象的方法
[2024-11-08] v0.11.9-preview1 升级 Senparc.AI
[2024-11-15] v0.12.0-preview1 使用新版本 AutoGen,升级 AgentsManager;解决 AgentsManager 中状态获取的异常
[2024-11-21] v0.13.2-preview1 更新 CO2NET 及缓存基础库
[2024-11-28] v0.13.3-preview1 update CO2NET, use new SenparcSetting with UseLowerCaseApiName property
[2024-12-27] v0.13.4-preview1 Add exception log for UseXncfModules() auto progress
[2025-01-25] v0.13.8-preview1 Update Agents functions, support for function calling
[2025-04-29] v0.13.10-preview1 Update CO2NET and AIKernel
[2025-05-18] v0.13.11-preview1 Update Installation
[2025-06-20] v0.13.12-preview1 Add MCP functions in XncfRegisterBase class
[2025-11-01] update basic libraries, including Senparc.AI
[2026-07-17] v0.15.0-preview2 为 Tenant 模块接入统一资源本地化并优化功能文案
1、接入统一资源本地化机制,支持模块功能文案按当前文化动态显示
2、统一模块注册信息、菜单名称与功能描述的本地化输出
3、补充并统一多语言资源键及资源文件
[2026-07-29] v0.15.1-preview3 Dependency update from Senparc.Ncf.AreaBase to 0.22.0-preview3
[2026-07-31] v0.15.2-preview4 升级 CO2NET WebApi 兼容依赖
1、升级 Senparc.CO2NET.WebApi 至 2.1.9-preview 以适配 CO2NET 4.2.0
[2026-08-04] v0.15.3-preview5 Dependency updates from upstream projects
1、Dependency update from Senparc.Ncf.AreaBase to 0.23.1-preview5
2、Dependency update from Senparc.Ncf.DatabasePlant to 0.21.5-preview5
3、Dependency update from Senparc.Ncf.Repository to 0.20.5-preview5
4、Dependency update from Senparc.Ncf.XncfBase to 0.24.0-preview5
5、Dependency update from Senparc.Xncf.Tenant.Interface to 0.10.5-preview5
[2026-08-08] v0.15.4-preview6 Dependency updates from upstream projects
1、Dependency update from Senparc.Ncf.DatabasePlant to 0.21.6-preview6
2、Dependency update from Senparc.Ncf.AreaBase to 0.23.2-preview6
3、Dependency update from Senparc.Ncf.Repository to 0.20.6-preview6
4、Dependency update from Senparc.Ncf.XncfBase to 0.24.1-preview6
5、Dependency update from Senparc.Xncf.Tenant.Interface to 0.10.6-preview6
[2026-08-13] v0.15.5-preview7 Dependency update from Senparc.Ncf.AreaBase to 0.23.3-preview7; Senparc.Ncf.DatabasePlant to 0.21.7-preview7; Senparc.Ncf.XncfBase to 0.25.0-preview7
[2026-08-15] v0.15.6-preview8 Dependency update from Senparc.Ncf.DatabasePlant to 0.21.8-preview8; Senparc.Ncf.Repository to 0.20.8-preview8; Senparc.Ncf.XncfBase to 0.25.1-preview8; [5990]Senparc.Xncf.Tenant.Interface to 0.10.8-preview8
[2026-08-22] v0.15.7-preview9 同步 [5990]Senparc.Xncf.Tenant 依赖版本
1、递归更新上游项目依赖,保持 [5990]Senparc.Xncf.Tenant 与当前版本组合兼容
[2026-08-29] v0.15.8 Dependency updates from Senparc.Ncf.DatabasePlant to 0.21.10; Dependency update from Senparc.Ncf.Repository to 0.20.9-preview9; Dependency update from Senparc.Ncf.XncfBase to 0.26.1; Dependency update from [5990]Senparc.Xncf.Tenant.Interface to 0.10.9-preview9
1、Dependency update from Senparc.Ncf.DatabasePlant to 0.21.10
2、Dependency update from Senparc.Ncf.Repository to 0.20.9-preview9
3、Dependency update from Senparc.Ncf.XncfBase to 0.26.1
4、Dependency update from [5990]Senparc.Xncf.Tenant.Interface to 0.10.9-preview9
[2026-09-16] v0.15.9 Dependency updates from Senparc.IntegrationSample to 0.0.13; Senparc.Xncf.AIAgentsHub to 0.13.9; Senparc.Xncf.AIAgentsHub.Tests to 0.0.13; Senparc.Xncf.PromptRange to 0.19.6; Senparc.Areas.Admin to 0.9.0; Senparc.Xncf.Installer to 0.5.7; Senparc.Xncf.Installer.Interface to 0.2.0
[2026-09-17] v0.15.10 Dependency updates from Senparc.Ncf.XncfBase to 0.28.0
1、同步受影响的基础库、AI 模块或宿主项目版本
2、保持项目引用链与当前功能兼容