Namespace eQuantic.Core.Data.Repository
Classes
- ConcurrencyConflictException
Thrown when a commit's optimistic-concurrency check fails: at least one staged update or delete matched no row, because another writer changed (or removed) it since it was read. The whole flush rolled back — nothing was applied. Reload the entities, reapply the changes and commit again.
- ContinuedResult<T>
A single page of a token-continued read: the items plus the opaque token that resumes after them. Unlike PagedResult<T> there is no total count — that is the point: the store walks its native paging path (Cassandra
PagingState, Cosmos continuation) instead of counting and skipping, so deep pages cost the same as the first one.
- DataConventions
The write conventions every provider honours — register one as a singleton (
services.AddSingleton(new DataConventions { ... })) to tune them; the defaults apply otherwise.- Clock — the time source behind
CreatedAt/UpdatedAt/DeletedAtstamps (inject a fixed TimeProvider in tests). - LifecycleStamps / SoftDelete — the lifecycle conventions are
on by default for entities implementing the
eQuantic.Core.Domaininterfaces; turn them off when the interfaces are adopted for other reasons. - CurrentUserId — the who behind the stamps: a per-request accessor
(receives the scope's IServiceProvider, like a global-filter factory). When set,
entities carrying
CreatedById/UpdatedById/DeletedByIdmembers — theeQuantic.Core.DataModelshapes — are stamped by property-name convention.
- Clock — the time source behind
- PageRequest
Represents a request for a single page of data, expressed as a one-based page index and a page size.
- PagedResult<T>
Represents a single page of results together with the total number of items available across all pages.
- QueryFilters
The global query filters — predicates a provider ANDs into every read (and set-based write) of an entity type, the way EF Core's
HasQueryFilterscopes multi-tenant data, soft deletes or row-level visibility. Register one instance as a singleton (services.AddSingleton(new QueryFilters().For<Order>(...))); the unit of work picks it up from its scope's service provider. A filter can be a fixed predicate or a per-request factory that receives the scoped IServiceProvider — resolve the current tenant (or user, or feature flag) there and return the predicate for this request. A query opts out with IgnoringQueryFilters(); set-based writes never opt out (a tenant-scoped delete stays tenant-scoped).
- QueryPlan
The execution plan a provider builds for a shaped read — what will actually run and at what cost. A plan never lies: everything the store executes is in Statement, everything the library evaluates client-side is in Residual, and the cost flags say so explicitly. Obtain one from a repository implementing IExplainableRepository<TEntity>; building a plan performs no I/O.
Interfaces
- IAsyncQueryableRepository<TEntity, TKey>
An asynchronous repository backed by an IQueryable<T> data source.
- IAsyncRepository
The asynchronous repository marker interface.
- IAsyncRepository<TEntity, TKey>
The asynchronous repository, composed of the asynchronous read and write repositories.
- IQueryableRepository<TEntity, TKey>
A synchronous repository backed by an IQueryable<T> data source.
- IQueryableUnitOfWork
A unit of work whose repositories are backed by an IQueryable<T> data source.
- IRepository
Repository marker interface.
- IRepository<TEntity, TKey>
Base interface for the "Repository Pattern". For more information about this pattern see http://martinfowler.com/eaaCatalog/repository.html.
- ISet<TEntity>
The database set interface.
- IUnionQueryRunner
A unit of work that runs a typed
UNION/UNION ALLon the store: every branch's filter and projection push down, the store combines the branches (deduplicating for Distinct<TResult>(params UnionBranch<TResult>[])), and only the combined rows travel. Providers opt in.
- IUnitOfWork
Contract for the 'Unit Of Work' pattern. For more related info see http://martinfowler.com/eaaCatalog/unitOfWork.html. To comply with the Persistence Ignorance principle in the domain, this contract abstracts the underlying persistence engine.