Docs
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 LifecycleProBuilderExtensions

Methods

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:

  • builder ProBuilder<TKey>: The Pro builder.
  • configure Action<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() or AddSchemaProvisioning().
  • <span class="term">Migrations</span>Call WithMigrationOrchestration().
  • <span class="term">Seeding</span>Register your own ITenantSeeder<TKey> implementation.

On this page