DmDefaults
Namespace: MJCZone.DapperMatic.Dml
Assembly: MJCZone.DapperMatic
Summary
Where the DML methods find the values a scope does not give them, set once at startup: the current tenant, the current user, and the clock. A scope's own <c>ForTenant</c> and <c>WithUser</c> win over them.
static public
Contents
Methods (4) | Properties (4)
Methods
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
TenantId
Gets or sets the current tenant's id, for models with a <c>[DmTenantKey]</c>; null for none, which refuses them.
Type: Func<object?>?
TenantSchema
Gets or sets the current tenant's schema, for a deployment with a schema per tenant: every model but the shared ones (DmSchemaLayout) is read and written there unless a scope says <c>InSchema</c>. Null for none, which leaves each model in its own schema.
Type: Func<string?>?
User
Gets or sets the current user, for <c>[DmCreatedBy]</c> and <c>[DmUpdatedBy]</c>; null for none, which leaves them as they are.
Type: Func<object?>?
Clock
Gets or sets the clock for <c>[DmCreatedAt]</c>, <c>[DmUpdatedAt]</c> and the time of a soft delete.
Type: TimeProvider