Sylin.Koan.Tenancy
1.0.46
dotnet add package Sylin.Koan.Tenancy --version 1.0.46
NuGet\Install-Package Sylin.Koan.Tenancy -Version 1.0.46
<PackageReference Include="Sylin.Koan.Tenancy" Version="1.0.46" />
<PackageVersion Include="Sylin.Koan.Tenancy" Version="1.0.46" />
<PackageReference Include="Sylin.Koan.Tenancy" />
paket add Sylin.Koan.Tenancy --version 1.0.46
#r "nuget: Sylin.Koan.Tenancy, 1.0.46"
#:package Sylin.Koan.Tenancy@1.0.46
#addin nuget:?package=Sylin.Koan.Tenancy&version=1.0.46
#tool nuget:?package=Sylin.Koan.Tenancy&version=1.0.46
Sylin.Koan.Tenancy
Tenant isolation as a referenced application capability: ordinary Entities become tenant-scoped while application code keeps the same business shape.
Install
dotnet add package Sylin.Koan.Tenancy
Keep the ordinary Koan bootstrap:
builder.Services.AddKoan();
AddKoan() compiles the module: the discriminator, guards, and per-pillar contributions come with the
reference. Entities and repositories stay as they are.
Meaningful use
public sealed class Invoice : Entity<Invoice>
{
public decimal Total { get; set; }
}
using (Tenant.Use("acme"))
{
await new Invoice { Total = 120m }.Save();
var invoices = await Invoice.All();
}
The ambient tenant automatically segments participating Data, Cache, Storage, Communication, and durable-context
capabilities. Each active pillar compiles the same tenant meaning into its own runtime chokepoint.
Use [HostScoped] for genuinely global control-plane Entities:
[HostScoped]
public sealed class PlanDefinition : Entity<PlanDefinition>;
Runtime behavior
- Development resolves an otherwise-unscoped operation to the stable local tenant
dev. - Non-Development hosts default to Closed posture: a tenant-scoped operation without a trusted scope fails with a corrective error before provider work.
Tenant.None()establishes explicit host intent. It allows host-scoped models; it does not turn a tenant Entity into host data.- Jobs and other Core context consumers can capture and restore the tenant without application carrier code.
- A provider that cannot enforce the compiled segmentation guarantee rejects the operation rather than degrading.
Override posture only for focused verification:
{
"Koan": {
"Tenancy": {
"Posture": "Closed"
}
}
}
Open posture outside Development refuses startup.
Durable control plane
TenantRecord stores the stable tenant id, display name, and optional routing code. Membership stores one
deterministic (tenant, subject) seat and its tenant roles. TenantAuditEntry is the integrity record used by the
supported Web administration projection.
Reference Sylin.Koan.Identity.Tenancy when authenticated HTTP requests should resolve carriers through active
durable Identity membership. Reference Sylin.Koan.Tenancy.Web for the operator registry/membership UI and API.
Boundaries
- Core Tenancy has no HTTP resolver prerequisite; workers and non-Web hosts use explicit or captured scope.
- Tenant routing codes written directly through Entity APIs can conflict. Inbound resolution fails closed on ambiguity; the supported Web administration path rejects duplicates.
- Tenant invitation, tenant-status enforcement, product-data erasure, verified custom domains, and operator act-as are not current guarantees.
- Audit entries are ordinary durable Entities written by the supported mutation chokepoint, not an append-only or externally attested ledger.
See TECHNICAL.md and the public tenancy guide.
| 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
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 1.0.39 && < 2.0.0)
- Sylin.Koan.Data.Abstractions (>= 1.0.41 && < 2.0.0)
- Sylin.Koan.Data.Core (>= 1.0.73 && < 2.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Sylin.Koan.Tenancy:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Identity.Tenancy
Compose durable Identity with Tenancy: active-membership request scoping, tenant-role projection, effective-access facts, and integrity-checked lifecycle receipts by reference plus AddKoan(). |
|
|
Sylin.Koan.Tenancy.Web
Reference-mounted tenant registry and membership administration for Koan: a bundled operator UI and API with separated exposure/authority controls, idempotent seat grants, and mutation audit. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.46 | 97 | 9/13/2026 |
| 1.0.44 | 146 | 9/12/2026 |
| 1.0.42 | 101 | 9/12/2026 |
| 1.0.41 | 112 | 9/10/2026 |
| 1.0.38 | 113 | 9/10/2026 |
| 1.0.35 | 121 | 9/9/2026 |
| 1.0.32 | 111 | 9/9/2026 |
| 1.0.30 | 140 | 9/9/2026 |
| 1.0.26 | 110 | 9/9/2026 |
| 1.0.25 | 116 | 9/9/2026 |
| 1.0.21 | 110 | 9/5/2026 |
| 1.0.20 | 139 | 8/30/2026 |
| 1.0.19 | 126 | 8/30/2026 |
| 1.0.18 | 115 | 8/28/2026 |
| 1.0.17 | 105 | 8/28/2026 |
| 1.0.16 | 125 | 8/28/2026 |
| 1.0.15 | 102 | 8/28/2026 |
| 1.0.14 | 111 | 8/28/2026 |
| 1.0.13 | 113 | 8/27/2026 |
| 1.0.9 | 133 | 8/25/2026 |