Show / Hide Table of Contents

Class CosmosIdentityBase

Provides the implementation of the basic properties of a Cosmos DB entity.

Inheritance
object
CosmosIdentityBase
TenantItemBase
Implements
ITenantItem
ICosmosIdentity
ITenantItem<string>
IEntityIdentity<string>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.CosmosDb.DomainModels
Assembly: Benday.CosmosDb.dll
Syntax
public abstract class CosmosIdentityBase : ITenantItem, ICosmosIdentity, ITenantItem<string>, IEntityIdentity<string>

Properties

| Edit this page View Source

EntityType

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
| Edit this page View Source

Etag

Optimistic concurrency token for the entity.

Declaration
[JsonPropertyName("_etag")]
public string Etag { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Id

Id of the entity.

Declaration
[JsonPropertyName("id")]
public string Id { get; set; }
Property Value
Type Description
string
| Edit this page View Source

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
| Edit this page View Source

Timestamp

Timestamp of the entity in human-readable format.

Declaration
public DateTime Timestamp { get; set; }
Property Value
Type Description
DateTime
| Edit this page View Source

TimestampUnixStyle

Timestamp of the entity.

Declaration
[JsonPropertyName("_ts")]
public long TimestampUnixStyle { get; set; }
Property Value
Type Description
long

Methods

| Edit this page View Source

GetEntityTypeName()

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

ITenantItem
ICosmosIdentity
Benday.Common.Interfaces.ITenantItem<TKey>
Benday.Common.Interfaces.IEntityIdentity<TKey>
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com