public static ReadOnlySegmentLinkedList <T> ExecuteReader <T>(this DbProviderFactory dbProviderFactory, string connectionString, ExecuteReaderRequest request, int segmentLength, Func <IDataRecord, T> readRecord) { ReadOnlySegmentLinkedList <T> rows = null; dbProviderFactory.ExecuteReader(connectionString, request, dataReader => rows = dataReader.ReadResult(segmentLength, readRecord)); return(rows); }
public static List <T> ExecuteReader <T>(this DbProviderFactory dbProviderFactory, string connectionString, ExecuteReaderRequest request, Func <IDataRecord, T> read) { List <T> rows = null; dbProviderFactory.ExecuteReader(connectionString, request, dataReader => rows = dataReader.ReadResult(read)); return(rows); }