Skip to main content
net10.0

系统核心模块(运行系统必须)

Published
Sep 18, 2026
1mo ago
Total Downloads
25.0K
25,030

Install

dotnet add package Senparc.Xncf.Tenant --version 0.15.10
ProductVersions
.NET
net10.0

README

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.

Changes from Previous Version

No structural changes between v0.15.9 and v0.15.10.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.