see on GitHub

Session : Querying : StreamQueryAsync

Query results can be streamed using StreamQueryAsync method from Advanced session operations.

Syntax

Task<IAsyncEnumerator<FileHeader>> StreamQueryAsync(IAsyncFilesQuery<FileHeader> query);

Parameters
query IAsyncFilesQuery<FileHeader> Query to stream results for

Return Value
Task<IAsyncEnumerator<FileHeader>> A task that represents the asynchronous operation. The task result is the enumerator of FileHeaders objects.

Example

var allFilesMatchingCriteria = new List<FileHeader>();

var query = session.Query().WhereStartsWith("Name","Fa" );

using (var reader = await session.Advanced.StreamQueryAsync(query))
{
    while (await reader.MoveNextAsync())
    {
        allFilesMatchingCriteria.Add(reader.Current);
    }
}

Information

Entities loaded using Stream will be transient (not attached to session).