Esempio n. 1
0
    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);
    }
Esempio n. 2
0
        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);
        }