Skip to main content
net10.0

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

Published
Jul 31, 2026
2mo ago
Total Downloads
25.0K
25,030

Install

dotnet add package Senparc.Xncf.Tenant --version 0.15.2-preview4
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.1-preview3 and v0.15.2-preview4.

Adoption Assessment

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

This version is marked prerelease. Validate its API and upgrade path before production use.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.