Tenantry ProAPI reference
LifecycleProBuilderExtensions class
Namespace: Tenantry.Pro.Lifecycle.Extensions · Package: Tenantry.Pro · API reference
Extension methods for registering tenant lifecycle management on ProBuilder<TKey>.
public static class LifecycleProBuilderExtensionsMethods
AddLifecycleManagement<TKey>(ProBuilder<TKey>, Action<TenantLifecycleOptions>?)
Registers ITenantLifecycleManager<TKey>, which orchestrates the full tenant creation pipeline: provision → migrate → seed.
public static ProBuilder<TKey> AddLifecycleManagement<TKey>(this ProBuilder<TKey> builder, Action<TenantLifecycleOptions>? configure = null) where TKey : IEquatable<TKey>, IParsable<TKey>Type parameters:
TKey: The tenant identifier type.
Parameters:
builderProBuilder<TKey>: The Pro builder.configureAction<TenantLifecycleOptions>: Optional configuration for lifecycle behaviour.
Returns: ProBuilder<TKey>: The same builder for chaining.
Each pipeline step only runs when its corresponding service is registered:
- <span class="term">Provisioning</span>Call
AddDatabaseProvisioning()orAddSchemaProvisioning(). - <span class="term">Migrations</span>Call
WithMigrationOrchestration(). - <span class="term">Seeding</span>Register your own
ITenantSeeder<TKey>implementation.