Class DataTransfer
Provides a way to convert an IDataReader implementation to a table-like data transfer object.
public static class DataTransfer
- Inheritance
-
DataTransfer
Methods
GetColumns(IDataReader)
Converts the specified and read-initialized reader implementation to a column-like data transfer object collection.
public static DataTransferColumnCollection GetColumns(IDataReader reader)
Parameters
readerIDataReaderThe read-initialized reader to be converted.
Returns
- DataTransferColumnCollection
A DataTransferColumnCollection that is the result of the specified and read-initialized
reader.
Exceptions
- ArgumentNullException
readeris null.- ArgumentException
readeris closed.- InvalidOperationException
Invalid attempt to read from
readerwhen no data is present.
GetRows(IDataReader)
Converts the specified reader implementation to a table-like data transfer object collection.
public static DataTransferRowCollection GetRows(IDataReader reader)
Parameters
readerIDataReaderThe reader to be converted.
Returns
- DataTransferRowCollection
A DataTransferRowCollection that is the result of the specified
reader.
Exceptions
- ArgumentNullException
readeris null.- ArgumentException
readeris closed.