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
commandIExecuteReaderThe IExecuteReader to iterate.
skipintThe number of entries to skip before starting to take results.
takeintThe maximum number of records to return.
transformFunc<IDataRecord, T>The transform function to process each IDataRecord.
Returns
- List<T>
The results from the skip, transform and take operation.
Type Parameters
TThe return type of the transform function.