TenantScoped<TKey> class
Namespace: Tenantry.Core · Package: Tenantry.Core · API reference
Optional base class for tenant-owned objects. Implements ITenantScoped<TKey> for convenience.
Using this base class is not required — you can implement ITenantScoped<TKey> directly. However, if you do use it, the TenantId property will be automatically implemented.
public abstract class TenantScoped<TKey> : ITenantScoped<TKey> where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters
TKey: The tenant identifier type. SeeITenantScoped<TKey>for constraints.
Implements ITenantScoped<TKey>.
Properties
TenantId
The identifier of the tenant that owns this entity. This value is automatically set by the interceptor on SaveChanges.
public TKey TenantId { get; set; }Value: TKey
TenantDescriptor<TKey> class
Default implementation of ITenantDescriptor<TKey>tenantry-core-itenantdescriptor.md.
TenantIsolationViolationException class
Thrown when a cross-tenant data isolation violation is detected during a SaveChanges or SaveChangesAsync call, or when a bulk update would set TenantId.