Class DataTransfer
Provides a way to convert an System.Data.IDataReader implementation to a table-like data transfer object.
Inheritance
Namespace: Cuemon.Data
Assembly: Cuemon.Data.dll
Syntax
public static class DataTransfer
Methods
| Improve this DocGetColumns(IDataReader)
Converts the specified and read-initialized reader
implementation to a column-like data transfer object collection.
Declaration
public static DataTransferColumnCollection GetColumns(IDataReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IDataReader | reader | The read-initialized reader to be converted. |
Returns
Type | Description |
---|---|
DataTransferColumnCollection | A DataTransferColumnCollection that is the result of the specified and read-initialized |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException |
|
System.InvalidOperationException | Invalid attempt to read from |
GetPagedRows(PagedSettings, Func<PagedSettings, IEnumerable<DataTransferRow>>, Func<PagedSettings, Int32>)
Retrieves a paged, table-like data transfer object collection from the specified selector
.
Declaration
public static PagedCollection<DataTransferRow> GetPagedRows(PagedSettings settings, Func<PagedSettings, IEnumerable<DataTransferRow>> selector, Func<PagedSettings, int> counter)
Parameters
Type | Name | Description |
---|---|---|
PagedSettings | settings | The PagedSettings that will be applied to the PagedCollection<T> result of this method. |
System.Func<PagedSettings, System.Collections.Generic.IEnumerable<DataTransferRow>> | selector | The function delegate that will determine the PagedCollection<T> result of this method. |
System.Func<PagedSettings, System.Int32> | counter | The function delegate that will determine the total number of rows in a data-source from the specified |
Returns
Type | Description |
---|---|
PagedCollection<DataTransferRow> | A PagedCollection<T> that is the result of the specified |
GetRows(IDataReader)
Converts the specified reader
implementation to a table-like data transfer object collection.
Declaration
public static DataTransferRowCollection GetRows(IDataReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IDataReader | reader | The reader to be converted. |
Returns
Type | Description |
---|---|
DataTransferRowCollection | A DataTransferRowCollection that is the result of the specified |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException |
|