Class TenantContextOptions
Configures how the tenancy pipeline behaves when no tenant resolves for a message or request.
public sealed class TenantContextOptions
- Inheritance
-
TenantContextOptions
- Inherited Members
- Extension Methods
Remarks
This is the explicit fail-fast-versus-default knob for ambient tenancy. When
RequireTenant is enabled and no tenant resolves on a tenant-required path, the
resolver pipeline fails fast (mirroring the storage-side
Excalibur.Data.Sharding.TenantShardNotFoundException) rather than proceeding with an
unscoped operation. DefaultTenantId is the opt-in fallback applied when a
tenant is not otherwise resolved.
Properties
DefaultTenantId
Gets or sets the explicit default tenant identifier applied when no tenant is otherwise resolved.
public string? DefaultTenantId { get; set; }
Property Value
RequireTenant
Gets or sets a value indicating whether a resolved tenant is mandatory.
public bool RequireTenant { get; set; }