Table of Contents

Class DataReaderExtensions

Namespace
Cuemon.Extensions.Data
Assembly
Cuemon.Extensions.Data.dll

Extension methods for the System.Data.IDataReader interface.

public static class DataReaderExtensions
Inheritance
Object
DataReaderExtensions

Methods

ToColumns(IDataReader)

Converts the specified and read-initialized reader implementation to a column-like data transfer object.

public static DataTransferColumnCollection ToColumns(this IDataReader reader)

Parameters

reader IDataReader

The read-initialized reader to be converted.

Returns

DataTransferColumnCollection

A DataTransferColumnCollection that is the result of the specified and read-initialized reader.

Exceptions

System.ArgumentNullException

reader is null.

System.ArgumentException

reader is closed.

System.InvalidOperationException

Invalid attempt to read from reader when no data is present.

ToRows(IDataReader)

Converts the specified reader implementation to a table-like data transfer object.

public static DataTransferRowCollection ToRows(this IDataReader reader)

Parameters

reader IDataReader

The reader to be converted.

Returns

DataTransferRowCollection

A DataTransferRowCollection that is the result of the specified reader.

Exceptions

System.ArgumentNullException

reader is null.

System.ArgumentException

reader is closed.