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
                    
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="Sylin.Koan.Tenancy" Version="1.0.46" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Tenancy" Version="1.0.46" />
                    
Directory.Packages.props
<PackageReference Include="Sylin.Koan.Tenancy" />
                    
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 Sylin.Koan.Tenancy --version 1.0.46
                    
#r "nuget: Sylin.Koan.Tenancy, 1.0.46"
                    
#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 Sylin.Koan.Tenancy@1.0.46
                    
#: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=Sylin.Koan.Tenancy&version=1.0.46
                    
Install as a Cake Addin
#tool nuget:?package=Sylin.Koan.Tenancy&version=1.0.46
                    
Install as a Cake Tool

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 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 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
Loading failed