Interface IStreamingReadRepository<TEntity>
- Namespace
- eQuantic.Core.Data.Repository.Read
- Assembly
- eQuantic.Core.Data.dll
A read repository that streams results through the store's native cursor/paging path as an IAsyncEnumerable<T> — rows arrive as the store produces them, nothing is buffered beyond a page, and enumeration can stop (or be cancelled) at any point without fetching the rest. The natural shape for exports, ETL and any read too large to materialize. Providers opt in.
public interface IStreamingReadRepository<TEntity> where TEntity : class
Type Parameters
TEntityThe entity type.
Methods
GetStreamAsync(QueryOptions<TEntity>?, CancellationToken)
Streams the elements matching the supplied options.
IAsyncEnumerable<TEntity> GetStreamAsync(QueryOptions<TEntity>? options = null, CancellationToken cancellationToken = default)
Parameters
optionsQueryOptions<TEntity>Optional query shaping (filter, sorting).
cancellationTokenCancellationTokenThe cancellation token (also observed between pages).
Returns
- IAsyncEnumerable<TEntity>
The matching entities, streamed page by page.