Table of Contents

Method IterateReaderWhile

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

IterateReaderWhile(IExecuteReader, Func<IDataRecord, bool>, CommandBehavior)

Iterates a reader on a command while the handler function returns true.

public static void IterateReaderWhile(this IExecuteReader command, Func<IDataRecord, bool> handler, CommandBehavior behavior = CommandBehavior.Default)

Parameters

command IExecuteReader

The IExecuteReader to iterate.

handler Func<IDataRecord, bool>

The handler function for each IDataRecord.

behavior CommandBehavior

The behavior to use with the data reader.