Table of Contents

Class CosmosEntityConfiguration<TEntity>

Namespace
eQuantic.Core.Data.CosmosDb
Assembly
eQuantic.Core.Data.CosmosDb.dll

The typed Cosmos mapping for TEntity.

public sealed class CosmosEntityConfiguration<TEntity> : CosmosEntityConfiguration where TEntity : class

Type Parameters

TEntity

The entity type.

Inheritance
CosmosEntityConfiguration<TEntity>
Inherited Members

Methods

GetETag(object)

Reads the concurrency token (the document's _etag) from an entity instance, or null when the entity declares none / carries none. When present, a Modify/Merge stages a conditional replace (If-Match) instead of an unconditional upsert.

public override string? GetETag(object entity)

Parameters

entity object

The entity.

Returns

string

GetId(object)

Reads the Cosmos document id (always a string) from an entity instance.

public override string GetId(object entity)

Parameters

entity object

The entity.

Returns

string

GetPartitionKey(object)

Reads the partition key value from an entity instance (for point writes, patches and deletes).

public override PartitionKey GetPartitionKey(object entity)

Parameters

entity object

The entity.

Returns

PartitionKey