Docs
Tenantry ProAPI reference

ITenantInfrastructureProvisioner<TKey> interface

Namespace: Tenantry.Pro.Lifecycle · Package: Tenantry.Pro · API reference

Provisions the infrastructure (database or schema) for a new tenant. Implemented by database-provider packages (Tenantry.Pro.EfCore.SqlServer, Tenantry.Pro.EfCore.Npgsql, etc.) and consumed by ITenantLifecycleManager<TKey> to run the provisioning step without depending on any specific provider or strategy.

public interface ITenantInfrastructureProvisioner<TKey> where TKey : IEquatable<TKey>, IParsable<TKey>

Type parameters

  • TKey: The tenant identifier type.

Derived types: DatabaseProvisioningService<TKey>, DatabaseProvisioningService<TKey>, SchemaProvisioningService<TKey>, DatabaseProvisioningService<TKey>, SchemaProvisioningService<TKey>, DatabaseProvisioningServiceBase<TKey>, SchemaProvisioningServiceBase<TKey>.

Properties

Step

Identifies which lifecycle step this provisioner represents. Used by TenantProvisioningResult<TKey>.CompletedUpTo to record pipeline progress.

TenantProvisioningStep Step { get; }

Value: TenantProvisioningStep

Methods

ProvisionAsync(TKey, CancellationToken)

Creates the infrastructure (database or schema) for the given tenant if it does not already exist.

Task ProvisionAsync(TKey tenantId, CancellationToken cancellationToken = default)

Parameters:

  • tenantId TKey: The tenant to provision.
  • cancellationToken CancellationToken: A cancellation token.

Returns: Task

On this page