Show / Hide Table of Contents

Class CosmosIdentityBase

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

Inheritance
object
CosmosIdentityBase
OwnedItemBase
Implements
IOwnedItem
ICosmosIdentity
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 : IOwnedItem, ICosmosIdentity

Properties

| Edit this page View Source

DiscriminatorValue

Second-level partition key for the entity. This value describes the domain model type for the entity.

Declaration
[JsonPropertyName("discriminator")]
public virtual string DiscriminatorValue { 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

OwnerId

The owner id of the entity. By default, this value will be the same as the PartitionKey for the entity.

Declaration
public virtual string OwnerId { get; set; }
Property Value
Type Description
string
| Edit this page View Source

PartitionKey

Top-level partition key of the entity.

Declaration
[JsonPropertyName("pk")]
public abstract string PartitionKey { 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

GetDiscriminatorName()

Get the discriminator value for the entity.

Declaration
protected abstract string GetDiscriminatorName()
Returns
Type Description
string

Discriminator value

Examples

Recommendation: this should be the class name for the domain model class

Implements

IOwnedItem
ICosmosIdentity
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com