public static async Task <List <T> > ExecuteReaderAsync <T>(this IDbCommandAsyncExecutor executor, ExecuteReaderRequest request, Func <IDataRecord, T> read) { List <T> records = null; await executor.ExecuteReaderAsync( request, async dataReader => records = await dataReader.ReadAsync(read, request.CancellationToken)); return(records); }
public static async Task <ReadOnlySegmentLinkedList <T> > ExecuteReaderAsync <T>(this IDbCommandAsyncExecutor executor, ExecuteReaderRequest request, int segmentLength, Func <IDataRecord, T> read) { ReadOnlySegmentLinkedList <T> records = null; await executor.ExecuteReaderAsync( request, async dataReader => records = await dataReader.ReadResultAsync(segmentLength, read, request.CancellationToken)); return(records); }
public static async Task <ExecuteReaderResponse <T1, T2, T3> > ExecuteReaderAsync <T1, T2, T3>(this IDbCommandAsyncExecutor executor, ExecuteReaderRequest request, Func <IDataRecord, T1> read1, Func <IDataRecord, T2> read2, Func <IDataRecord, T3> read3) { ExecuteReaderResponse <T1, T2, T3> response = null; await executor.ExecuteReaderAsync( request, async dataReader => response = await dataReader.ReadAsync(read1, read2, read3, request.CancellationToken)); return(response); }