Interface IContinuationReadRepository<TEntity>
- Namespace
- eQuantic.Core.Data.Repository.Read
- Assembly
- eQuantic.Core.Data.dll
A read repository that pages through its store's native continuation mechanism (Cassandra
PagingState, Cosmos continuation tokens) instead of count-and-skip: every page costs the same,
however deep, and the token is an opaque string a caller can hold across requests. Providers opt in.
public interface IContinuationReadRepository<TEntity> where TEntity : class
Type Parameters
TEntityThe entity type.
Methods
GetPageAsync(int, string?, QueryOptions<TEntity>?, CancellationToken)
Reads one page, resuming after continuationToken when supplied. The page size is
the store's fetch hint — a page may hold fewer items (and client-evaluated residual filters reduce it
further); the read is exhausted when the returned token is null.
Task<ContinuedResult<TEntity>> GetPageAsync(int pageSize, string? continuationToken = null, QueryOptions<TEntity>? options = null, CancellationToken cancellationToken = default)
Parameters
pageSizeintThe page size hint (at least 1).
continuationTokenstringThe token from the previous page, or
nullfor the first page.optionsQueryOptions<TEntity>Optional query shaping (filter, sorting).
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<ContinuedResult<TEntity>>
The page and the token resuming after it.