Class CosmosIdentityBase
Provides the implementation of the basic properties of a Cosmos DB entity.
Inherited Members
Namespace: Benday.CosmosDb.DomainModels
Assembly: Benday.CosmosDb.dll
Syntax
public abstract class CosmosIdentityBase : ITenantItem, ICosmosIdentity, ITenantItem<string>, IEntityIdentity<string>
Properties
| Edit this page View SourceEntityType
Second-level partition key for the entity. This value describes the domain model type for the entity.
Declaration
[JsonPropertyName("entityType")]
public virtual string EntityType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Etag
Optimistic concurrency token for the entity.
Declaration
[JsonPropertyName("_etag")]
public string Etag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Id
Id of the entity.
Declaration
[JsonPropertyName("id")]
public string Id { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TenantId
Top-level partition key of the entity. Represents the tenant that owns this entity.
Declaration
[JsonPropertyName("tenantId")]
public virtual string TenantId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Timestamp
Timestamp of the entity in human-readable format.
Declaration
public DateTime Timestamp { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
TimestampUnixStyle
Timestamp of the entity.
Declaration
[JsonPropertyName("_ts")]
public long TimestampUnixStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
| Edit this page View SourceGetEntityTypeName()
Get the entity type name for this entity.
Declaration
protected abstract string GetEntityTypeName()
Returns
| Type | Description |
|---|---|
| string | Entity type name |
Examples
Recommendation: this should be the class name for the domain model class
Implements
Benday.Common.Interfaces.ITenantItem<TKey>
Benday.Common.Interfaces.IEntityIdentity<TKey>