.NET API
SingleTenantContext
Tracon.Core.dllThe default tenant context for single-tenant deployments. It always returns TraconOptions.DefaultTenantId.
public sealed class SingleTenantContext : ITenantContext- Inheritance
- object ← SingleTenantContext
- Implements
- ITenantContext
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”In multi-tenant scenarios, the consumer registers its ITenantContext
implementation before calling AddTracon. Tracon uses
TryAdd, so the consumer registration wins.
Properties
Section titled “Properties”TenantId
Section titled “ TenantId”The current tenant’s identifier. Never returns empty.
public string TenantId { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The value must be canonical — the form
AmbientTenantScope.Normalize returns. The tenant
identifier is matched case-insensitively across the product, and every
layer achieves that by normalizing the value rather than by comparing
case-insensitively. An implementation that returns Acme where
another path resolves acme splits one tenant into two on
PostgreSQL and SQLite, and merges them on SQL Server’s default
collation — the authorization layer and the storage layer then disagree.