SchemaDeprovisioningOptions<TContext> class
Namespace: Tenantry.Pro.EfCore · Package: Tenantry.Pro.EfCore · API reference
How offboarding drops each tenant's schema. Set with pro.AddSchemaDeprovisioning<TContext>(o => …).
public sealed class SchemaDeprovisioningOptions<TContext> where TContext : DbContextType parameters
TContext: The context, connected to the shared database, whose schema is dropped.
Properties
CreateContext
Creates the context the schema is dropped through, from the tenant's scope, where the tenant is current. Use it to connect with credentials allowed to drop schemas and their tables, when the application's own are not; the step disposes the context. It also creates each other tenant's context, to check none of them uses the schema. When not set, the context comes from the application's registration: its IDbContextFactory<TContext>, if it has one, otherwise TContext from the tenant's scope.
public Func<IServiceProvider, TContext>? CreateContext { get; set; }Value: Func<IServiceProvider, TContext>
MigrationStatusEntry<TKey> class
Which of a context's migrations a database or schema has applied, and which are pending: the database or schema the context connects to for the tenants in MigrationStatusEntry<TKey>.TenantIdstenantry-pro-efcore-migrationstatusentry.md.
SchemaPerTenantOptions<TKey> class
Schema per tenant: each tenant's tables in a schema of its own, in a shared database.