Interface ITenantPartitionedStore
Declares that a store implementation persists the tenant discriminator on every row it writes and re-establishes the owning tenant from the row on read, rather than reading it from an injected ambient ITenantContext.
public interface ITenantPartitionedStore
- Extension Methods
Remarks
AddTenantAwareStore derives the ambient-scoped mechanism structurally, from whether a store's
constructor declares an ITenantContext parameter — a fact the type system can prove.
The row-partitioned mechanism has no equivalent structural signal: a constructor with no
ITenantContext parameter is consistent with a store that carries the tenant on the row
and with a store that implements no tenancy mechanism at all. The absence of one claim is
not evidence for the other, so the seam does not infer row-partitioning from what a constructor
omits — it requires a store to state the claim itself, by implementing this interface.
A store that implements neither this interface nor takes an ITenantContext constructor
parameter is registered with no tenancy capability marker at all — the same outcome as a store built
before either mechanism existed. Row-discriminator multi-tenancy then fails closed if the contract it
registers under requires a capability marker (RequireTenantScopingCapability<TContract> /
RequireTenantPartitionedCapability<TContract>), exactly as it does for any other
unattested provider.