Class ValueConverterAttribute
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true)]
public class ValueConverterAttribute : MappingAttribute, _Attribute
- Inheritance
-
ValueConverterAttribute
- Implements
- Inherited Members
- Extension Methods
Properties
ConverterType
Gets or sets converter type. ConverterType should implement IValueConverter interface, should have public constructor with no parameters.
public Type? ConverterType { get; set; }
Property Value
ValueConverter
ValueConverter for mapping Database Values to Model values.
public IValueConverter? ValueConverter { get; set; }
Property Value
Methods
GetObjectID()
Returns mapping attribute id, based on all attribute options.
public override string GetObjectID()
Returns
GetValueConverter(ColumnDescriptor)
Returns IValueConverter for specific column.
public virtual IValueConverter? GetValueConverter(ColumnDescriptor columnDescriptor)
Parameters
columnDescriptor
ColumnDescriptor