Tenantry ProAPI reference
PostgreSqlProBuilderExtensions class
Namespace: Tenantry.Pro.EfCore.Npgsql.Extensions · Package: Tenantry.Pro.EfCore.Npgsql · API reference
Extension methods for registering PostgreSQL-backed Tenantry.Pro services on ProBuilder<TKey>.
public static class PostgreSqlProBuilderExtensionsMethods
AddDatabaseProvisioning<TKey>(ProBuilder<TKey>)
Registers TService as the database-per-tenant provisioner singleton. Call this after pro.UseDatabasePerTenant(...) when you need on-demand database provisioning for new tenants.
public static ProBuilder<TKey> AddDatabaseProvisioning<TKey>(this ProBuilder<TKey> builder) where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters:
TKey: The tenant identifier type.
Parameters:
builderProBuilder<TKey>: The Pro builder.
Returns: ProBuilder<TKey>
AddSchemaProvisioning<TKey>(ProBuilder<TKey>, Action<SchemaProvisioningOptions>)
Registers TService as the schema-per-tenant provisioner singleton. Call this after pro.UseSchemaPerTenant(...) when you need on-demand schema provisioning for new tenants.
public static ProBuilder<TKey> AddSchemaProvisioning<TKey>(this ProBuilder<TKey> builder, Action<SchemaProvisioningOptions> configure) where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters:
TKey: The tenant identifier type.
Parameters:
builderProBuilder<TKey>: The Pro builder.configureAction<SchemaProvisioningOptions>: Configures provisioning options. At minimum setSchemaProvisioningOptions.ConnectionStringto the shared database connection string.
Returns: ProBuilder<TKey>