Skip to content

DmTenant ​

Namespace: MJCZone.DapperMatic.Security

Assembly: MJCZone.DapperMatic

Summary ​

The tenant a request acts for, and what is known about it. Nothing here assumes a tenant model: a tenant may be a key on rows, a schema, a database, a node of a tree, or any mix; policies and session values read what they need.

sealed public

Contents ​

Constructors (1) | Methods (4) | Properties (4)

Constructors ​

DmTenant ​

Initializes a new instance of the DmTenant class.

csharp
DmTenant(object id)

Parameters ​

  • id (object) - The tenant's id, as the application knows it: a string, a number, a GUID.

Methods ​

ToString ​

csharp
string ToString()

Returns ​

Type: string

GetType ​

csharp
GetType()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()

Properties ​

Id ​

Gets the tenant's id.

Type: object

DatasourceId ​

Gets or sets the datasource the tenant's data is in, or null for none in particular. When set, a request naming another datasource is refused.

Type: string?

SchemaName ​

Gets or sets the schema the tenant's tables are in, or null for none in particular. When set, a request naming another schema is refused, and one naming none uses it.

Type: string?

Values ​

Gets values known about the tenant, which policies and session values read as <c>@tenant.name</c>: its path in a tree, the ids below it, its region. A value may also be a function computing it when first read.

Type: Dictionary&lt;string, object?&gt;