Table of Contents

Class CosmosModel

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

The registered Cosmos mappings, keyed by entity type.

public sealed class CosmosModel
Inheritance
CosmosModel
Inherited Members

Properties

Configurations

The registered configurations.

public IReadOnlyDictionary<Type, CosmosEntityConfiguration> Configurations { get; }

Property Value

IReadOnlyDictionary<Type, CosmosEntityConfiguration>

Converters

The value converters the model declared (joined into the serializer by CosmosClientFactory).

public IReadOnlyList<JsonConverter> Converters { get; }

Property Value

IReadOnlyList<JsonConverter>

Methods

Explain()

Describes every mapping decision the model made — container, partition key path, document id source, TTL and concurrency — the way Explain() describes a query. Read this instead of guessing what the mapping ended up being.

public string Explain()

Returns

string

For(Type)

Gets the configuration for an entity type, or throws when it was not registered.

public CosmosEntityConfiguration For(Type entityType)

Parameters

entityType Type

The entity type.

Returns

CosmosEntityConfiguration