Tenantry ProAPI reference
MixedModeOptions<TKey> class
Namespace: Tenantry.Pro.Strategies.MixedMode · Package: Tenantry.Pro · API reference
Options for the mixed-mode strategy, which routes individual tenants to either database-per-tenant or schema-per-tenant isolation.
public sealed class MixedModeOptions<TKey> where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters
TKey: The tenant identifier type.
Properties
GetStrategyForTenant
A delegate that returns the isolation strategy for the given tenant descriptor.
public Func<ITenantDescriptor<TKey>, TenantStrategy>? GetStrategyForTenant { get; set; }Value: Func<ITenantDescriptor<TKey>, TenantStrategy>
opts.GetStrategyForTenant = tenant => tenant.TenantId.StartsWith("enterprise_")
? TenantStrategy.Database
: TenantStrategy.Schema;IConnectionStringProtector interface
Encrypts and decrypts connection strings for at-rest protection in the connection string cache.
MixedStrategyResolver<TKey> class
Resolves the connection string or schema name for the tenant currently in scope, delegating to the appropriate underlying resolver based on the tenant's assigned strategy.