Extensions for HttpContext class.
Gets the current ITenant stored within the HttpContext or null if no tenant is found.
public GetCurrentTenant<TTenant>(context)
The ITenant stored within context or null.
Name | Type | Summary |
---|---|---|
context | HttpContext | The HttpContext. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when context is null. |
Stores the current ITenant in the HttpContext. If tenant is null a stored tenant is removed from the context.
public Void SetCurrentTenant<TTenant>(context, tenant)
Name | Type | Summary |
---|---|---|
context | HttpContext | The HttpContext. |
tenant | TTenant | An ITenant to be stored or null to remove an existing one. |
In this document