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
commandIDbCommandThe IDbCommand to generate a reader from.
predicateFunc<IDataRecord, bool>The handler function that processes each IDataRecord and decides if iteration should continue.
behaviorCommandBehaviorThe behavior to use with the data reader.