Table of Contents

Method IterateReaderWhile

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

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

Iterates an IDataReader on a command while the predicate returns true.

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

Parameters

command IDbCommand

The IDbCommand to generate a reader from.

predicate Func<IDataRecord, bool>

The handler function that processes each IDataRecord and decides if iteration should continue.

behavior CommandBehavior

The behavior to use with the data reader.