Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

DataReaderAsyncMappingExtensions

Namespace OfficeIMO.Data
Assembly OfficeIMO.Core
Modifiers static

Asynchronous typed row projections for forward-only data readers.

Inheritance

  • Object
  • DataReaderAsyncMappingExtensions

Methods

RowsAsAsync``1 3 overloads
public static IAsyncEnumerable<T> RowsAsAsync<T>(DbDataReader reader, CancellationToken cancellationToken = default) #
Returns: IAsyncEnumerable<T>

Asynchronously projects remaining rows by matching column names to writable public properties. The caller retains ownership of the reader.

Type Parameters

T

Parameters

reader System.Data.Common.DbDataReader requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public static IAsyncEnumerable<T> RowsAsAsync<T>(DbDataReader reader, Action<RowMapper<T>> configure, CancellationToken cancellationToken = default) #
Returns: IAsyncEnumerable<T>

Asynchronously projects remaining rows using explicit, AOT-safe column assignments. The caller retains ownership of the reader.

Type Parameters

T

Parameters

reader System.Data.Common.DbDataReader requiredposition: 0
configure System.Action{OfficeIMO.Data.RowMapper{``0}} requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public static IAsyncEnumerable<T> RowsAsAsync<T>(DbDataReader reader, Func<IDataRecord, T> factory, CancellationToken cancellationToken = default) #
Returns: IAsyncEnumerable<T>

Asynchronously projects remaining rows with a caller-supplied factory. The caller retains ownership of the reader.

Type Parameters

T

Parameters

reader System.Data.Common.DbDataReader requiredposition: 0
factory System.Func{System.Data.IDataRecord,``0} requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2