Skip to content

GetListStream Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

IAsyncEnumerable<T> GetListStream(QueryBuilder<T> query, CancellationToken cancellationToken = null) ​

csharp
IAsyncEnumerable<T> GetListStream(QueryBuilder<T> query, CancellationToken cancellationToken = null)

Executes the specified query and returns an asynchronous stream of results.

Type parameters ​

NameDescription
TThe entity (row) type.

Parameters ​

NameDescription
cancellationTokenCancellation token for query execution and enumeration.
queryQuery describing predicates, joins, ordering, paging, and projection.

Returns ​

An asynchronous sequence that yields records as they are read. Enumeration is deferred until the sequence is iterated.

Remarks ​

Intended for large result sets to avoid materializing all rows in memory. Uses the same cached SELECT template and per-execution parameters as GetListAsync. Implementations should ensure underlying readers are disposed when enumeration completes or is aborted.