Tenantry CoreAPI reference
ITenantRegistration interface
Namespace: Tenantry · Package: Tenantry.Core · API reference
A registration that needs the tenant key type, added through ITenantBuilder.Add. Packages use it for builder methods that take a type parameter of their own, such as a DbContext type.
public interface ITenantRegistrationMethods
Apply<TKey>(ITenantBuilder<TKey>)
Registers the feature's services for the tenant key type TKey.
void Apply<TKey>(ITenantBuilder<TKey> tenant) where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters:
TKey: The tenant key type of the builder.
Parameters:
tenantITenantBuilder<TKey>: The builder the registration was added to.
ITenantLookup<TKey> interface
Reads tenants from the registered ITenantStore<TKey>tenantry-itenantstore.md on behalf of singletons, such as hosted services, resolving the store from a fresh dependency-injection scope for each call.
ITenantScope<TKey> interface
A dependency-injection scope with a tenant current, created by ITenantScopeFactory<TKey>tenantry-itenantscopefactory.md.