TTenantScope.Use Method
Makes the given tenant the ambient tenant of the current thread until the returned scope is released.
Syntax
Unit: Aurelius.Tenancy.Context
class function TTenantScope.Use(const ATenantId: string): ITenantScope; static;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | ATenantId | string | The id of the tenant to activate. |
Returns
An ITenantScope that restores the previous tenant when released.