Represents the mapping from a database column to a PropertyInfo.
More...
|
| ColumnNameMapping (PropertyInfo property, string columnName) |
| Creates a new instance of ColumnNameMapping More...
|
|
override object | GetPropertyValue (IDataRecord row) |
| Converts the value for the column in the row with a name matching that of the mapped property to the type of the property. More...
|
|
void | Map (object instance, IDataRecord row) |
| Performs the actual mapping from column to property. More...
|
|
|
static object | ConvertValue (object value, Type conversionType) |
| Converts the database value value to conversionType . More...
|
|
static object | ConvertNullableValue (object value, Type conversionType) |
| Converts the database value value to conversionType , where conversionType is a nullable value. More...
|
|
static object | ConvertNonNullableValue (object value, Type conversionType) |
| Converts the database value value to conversionType . Will throw an exception if conversionType is a nullable value. More...
|
|
|
string | ColumnName [get] |
| Gets the name of the column that is used for mapping. More...
|
|
PropertyInfo | Property [get] |
| Gets the property that will be mapped to. More...
|
|
Represents the mapping from a database column to a PropertyInfo.
◆ ColumnNameMapping()
Microsoft.Practices.EnterpriseLibrary.Data.ColumnNameMapping.ColumnNameMapping |
( |
PropertyInfo |
property, |
|
|
string |
columnName |
|
) |
| |
Creates a new instance of ColumnNameMapping
- Parameters
-
columnName | The name of the column that will be used for mapping. |
property | The property that will be used to map to. |
◆ ConvertNonNullableValue()
static object Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.ConvertNonNullableValue |
( |
object |
value, |
|
|
Type |
conversionType |
|
) |
| |
|
staticprotectedinherited |
Converts the database value value to conversionType . Will throw an exception if conversionType is a nullable value.
- Parameters
-
value | Value from the database. |
conversionType | Type to convert to. |
- Returns
- The converted value.
◆ ConvertNullableValue()
static object Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.ConvertNullableValue |
( |
object |
value, |
|
|
Type |
conversionType |
|
) |
| |
|
staticprotectedinherited |
Converts the database value value to conversionType , where conversionType is a nullable value.
- Parameters
-
value | Value from the database. |
conversionType | Type to convert to. |
- Returns
- The converted value.
◆ ConvertValue()
static object Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.ConvertValue |
( |
object |
value, |
|
|
Type |
conversionType |
|
) |
| |
|
staticprotectedinherited |
Converts the database value value to conversionType .
◆ GetPropertyValue()
override object Microsoft.Practices.EnterpriseLibrary.Data.ColumnNameMapping.GetPropertyValue |
( |
IDataRecord |
row | ) |
|
|
virtual |
Converts the value for the column in the row with a name matching that of the mapped property to the type of the property.
- Parameters
-
- Returns
- The value for the corresponding column converted to the type of the mapped property.
- Exceptions
-
ArgumentNullException | row is null. |
Implements Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.
◆ Map()
void Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.Map |
( |
object |
instance, |
|
|
IDataRecord |
row |
|
) |
| |
|
inherited |
Performs the actual mapping from column to property.
- Parameters
-
◆ SetValue()
void Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.SetValue |
( |
object |
instance, |
|
|
object |
value |
|
) |
| |
|
protectedinherited |
Sets the value to instance using PropertyMapping.Property.
- Parameters
-
instance | The object value will be assigned to. |
value | The value that will be assigned to instance . |
◆ ColumnName
string Microsoft.Practices.EnterpriseLibrary.Data.ColumnNameMapping.ColumnName |
|
get |
Gets the name of the column that is used for mapping.
◆ Property
PropertyInfo Microsoft.Practices.EnterpriseLibrary.Data.PropertyMapping.Property |
|
getinherited |
Gets the property that will be mapped to.
The documentation for this class was generated from the following file: