DbColumnMap
Class DbColumnMap
This attribute defines the mapping between property names in the objects and column names in the database. By default, when reading or writing data from/into a database, properties in your objects are mapped to database columns with the same name (case-sensitive). Using this attribute, you can add your own mapping. (E.g. a property "Prop1" is mapped by default to the database column "Prop1". Create a column mapping to change the mapping to "Column1")
Implements
Inherited Members
Namespace: ETLBox
Assembly: ETLBox.dll
Syntax
Examples
public class MyPoco
{
[DbColumnMap("Column1")]
public string Prop1 { get; set; }
}
Constructors
DbColumnMap()
Declaration
DbColumnMap(string)
Creates a mapping between the a property and a database column
Declaration
Parameters
Type | Name | Description |
---|---|---|
string | dbColumnName | The name of the column in the database |
Properties
ArrayIndex
Index of the element in the array, only necessary if you use arrays as data type
Declaration
Property Value
Type | Description |
---|---|
int? |
DbColumnName
Name of the database column
Declaration
Property Value
Type | Description |
---|---|
string |
IgnoreColumn
If set to true, this property will be ignored and not mapped to any column.
Declaration
Property Value
Type | Description |
---|---|
bool |
PropertyName
Name of the property that should be mapped to a database column
Declaration
Property Value
Type | Description |
---|---|
string |
Methods
Clone()
Declaration
Returns
Type | Description |
---|---|
object |