Table of Contents

Namespace eQuantic.Core.Data.Modeling

Classes

ClusteringKeyAttribute

Declares an ordered-read member — "I read this sorted, within the key" — and each store materializes the declaration as well as it can: Cassandra as a real clustering key (rows physically ordered in the partition), relational stores and MongoDB as a multi-column index with the declared directions, Cosmos DB as a composite index on the container's policy (two or more members). The semantics of queries never change; only the plan does.

ConcurrencyTokenAttribute

Declares the optimistic-concurrency token: the versioned column on relational stores (WHERE … AND version = @old, bumped on every write), the _etag member on Cosmos DB (conditional If-Match replace).

CounterAttribute

Declares a Cassandra counter column (the table mutates through increments, never inserts).

DefaultValueAttribute

The value existing records take when this member is added to a model that is already in production.

On a relational store the column arrives with it as its default; on a document store it is written into the documents that predate the member. That second case is the one that bites: a document without the element does not fail to load, it loads as default(T) — an enum becomes its first value, a date becomes 0001-01-01 — so the data is quietly wrong rather than loudly missing.

The value belongs to the domain, not to the schema, which is why the engine will not invent one: a member added without it produces a change that refuses to run until you say what the existing records should hold.

EntityAttribute

The store-neutral modeling vocabulary: one set of eQuantic-owned annotations that every provider interprets — no driver attributes on entities ([BsonElement], EF's [Column]…), no rewrite when an entity moves between stores. The names are deliberately distinct from System.ComponentModel.DataAnnotations so both can coexist without ambiguity.

Precedence is explicit and deterministic: conventions < annotations < fluent — the annotations seed each provider's model builder, and fluent configuration overrides them. Each provider honours the subset that maps to its store (the model's Explain() shows the outcome); annotations outside a store's vocabulary are ignored, never errors.

EntityKeyAttribute

Declares the entity's key member (a member named Id is the convention otherwise).

FacetAttribute

Declares storage facets for a member — a maximum Length for text, a Precision/Scale for decimals. Relational DDL sizes the column with them (varchar(n), numeric(p,s)); stores without sized types ignore them.

PartitionKeyAttribute

Declares the member part of the partition key — the access-pattern declaration: Cassandra's partition key and Cosmos DB's partition key path (compose with Order — Cosmos builds a hierarchical, multi-hash key from up to three members). Relational stores and MongoDB have no partition concept and ignore it.

PreviousNameAttribute

The member's previous stored name, so a rename reads as a rename. A model comparison sees only that one name is gone and another has appeared; without this it cannot tell a rename from a member dropped and another added — and on a document store that difference is whether the data survives. Declaring the old name makes the intent explicit and lets the change be generated as a rename, keeping the values.

Name several when a member has been renamed more than once; the comparison accepts any of them.

SearchIndexAttribute

Declares a search-indexed text member: StartsWith/EndsWith/Contains and Db.Like push down natively on it (Cassandra SASI; the migration creates the index).

StoredAsAttribute

The member's stored name — a column (relational), a document field (MongoDB) — when the provider's naming convention does not fit.

TimeToLiveAttribute

Declares the entity's default time-to-live (Cosmos DB container TTL).

UnmappedAttribute

Excludes the member from the mapping (navigations are excluded automatically; this is for the rest).

Enums

SearchMode

What a search index can match — and therefore which LIKE shapes push down.