Table of Contents

Method SkipThenTake

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

SkipThenTake<T>(IExecuteReader, int, int, Func<IDataRecord, T>)

Iterates an IDataReader and skips by the skip parameter returns the maximum remaining defined by the take parameter.

public static List<T> SkipThenTake<T>(this IExecuteReader command, int skip, int take, Func<IDataRecord, T> transform)

Parameters

command IExecuteReader

The IExecuteReader to iterate.

skip int

The number of entries to skip before starting to take results.

take int

The maximum number of records to return.

transform Func<IDataRecord, T>

The transform function to process each IDataRecord.

Returns

List<T>

The results from the skip, transform and take operation.

Type Parameters

T

The return type of the transform function.