Class DataReaderExtensions
Inheritance
System.Object
DataReaderExtensions
Namespace: Paradigm.ORM.Data.Extensions
Assembly: Paradigm.ORM.Data.dll
Syntax
public static class DataReaderExtensions : object
Methods
| Improve this Doc View SourceGetValue(IDatabaseReader, PropertyInfo)
Gets the value of the specified column.
Declaration
public static object GetValue(this IDatabaseReader reader, PropertyInfo property)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseReader | reader | The database reader. |
PropertyInfo | property | A property info. The system will use the property name to search for the column. |
Returns
Type | Description |
---|---|
System.Object | The column value as |
GetValue(IDatabaseReader, Int32, Type)
Gets the value of the specified column.
Declaration
public static object GetValue(this IDatabaseReader reader, int index, Type type)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseReader | reader | The database reader. |
System.Int32 | index | The column index. |
Type | type | The expected type. |
Returns
Type | Description |
---|---|
System.Object | The column value as |
GetValue(IDatabaseReader, String)
Gets the value of the specified column.
Declaration
public static object GetValue(this IDatabaseReader reader, string name)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseReader | reader | The database reader. |
System.String | name | The column name. |
Returns
Type | Description |
---|---|
System.Object | The column value as |
GetValue(IDatabaseReader, String, Type)
Gets the value of the specified column.
Declaration
public static object GetValue(this IDatabaseReader reader, string name, Type type)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseReader | reader | The database reader. |
System.String | name | The column name. |
Type | type | The expected type. |
Returns
Type | Description |
---|---|
System.Object | The column value as |
GetValue<T>(IDatabaseReader, Int32)
Gets the value of the specified column.
Declaration
public static object GetValue<T>(this IDatabaseReader reader, int index)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseReader | reader | The database reader. |
System.Int32 | index | The column index. |
Returns
Type | Description |
---|---|
System.Object | The value of the column as |
Type Parameters
Name | Description |
---|---|
T | Expected type. |
GetValue<T>(IDatabaseReader, String)
Gets the value of the specified column.
Declaration
public static object GetValue<T>(this IDatabaseReader reader, string name)
Parameters
Type | Name | Description |
---|---|---|
IDatabaseReader | reader | The database reader. |
System.String | name | The column name. |
Returns
Type | Description |
---|---|
System.Object | The value of the column as |
Type Parameters
Name | Description |
---|---|
T | Expected type. |