Table of Contents

Method ExecuteReader

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

ExecuteReader(Action<TReader>, CommandBehavior)

Executes a reader on a command with a handler function.

void ExecuteReader(Action<out TReader> handler, CommandBehavior behavior = CommandBehavior.Default)

Parameters

handler Action<TReader>

The handler function for the data reader.

behavior CommandBehavior

The command behavior for once the command the reader is complete.

ExecuteReader<T>(Func<TReader, T>, CommandBehavior)

Executes a reader on a command with a transform function.

T ExecuteReader<T>(Func<out TReader, T> transform, CommandBehavior behavior = CommandBehavior.Default)

Parameters

transform Func<TReader, T>

The transform function for each IDataRecord.

behavior CommandBehavior

The command behavior for once the command the reader is complete.

Returns

T

The result of the transform.

Type Parameters

T

The return type of the transform function.