Class ColumnAttribute
Assiciates a ModelProperty with one or many database columns.
Inheritance
Implements
Inherited Members
Namespace: TimeCockpit.Data.DataModel
Assembly: TimeCockpit.Data.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class ColumnAttribute : Attribute, _Attribute
Constructors
ColumnAttribute(Type)
Initializes a new instance of the ColumnAttribute class.
Declaration
public ColumnAttribute(Type dataType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | dataType | The .NET type of the column. |
Properties
DataType
Gets the .NET type of the column.
Declaration
public Type DataType { get; }
Property Value
| Type | Description |
|---|---|
| System.Type |
IsNullableName
Gets or sets the name of the property that provides information about a property being nullable or not.
Declaration
public string IsNullableName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The IsNullableName property is only valid for properties which represent a complex type.
PrecisionPropertyName
Gets or sets the name of the property that provides the total number of digits to the left and right of the decimal point.
Declaration
public string PrecisionPropertyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The PrecisionPropertyName property is only valid for properties of type System.Decimal.
ScalePropertyName
Gets or sets the name of the property that provides the maximum number of decimal digits that can be stored to the right of the decimal point.
Declaration
public string ScalePropertyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The ScalePropertyName property is only valid for properties of type System.Decimal.
SizePropertyName
Gets or sets the name of the property that provides the max lenght of the column.
Declaration
public string SizePropertyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The SizePropertyName property is only valid for properties of type System.String.
ValuePropertyName
Gets or sets the name of the property that provides the name of the property containing the value.
Declaration
public string ValuePropertyName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
The ValuePropertyName property is only valid for properties which represent a complex type.