Class DynamicColumnAccessorAttribute
Configure setter and getter methods for dynamic columns.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class DynamicColumnAccessorAttribute : MappingAttribute, _Attribute
- Inheritance
-
DynamicColumnAccessorAttribute
- Implements
- Inherited Members
- Extension Methods
Remarks
Expected signatures for getter and setter:
// should return true and value of property, if property value found in storage
// should return false if property value not found in storage
static object Getter(Entity object, string propertyName, object defaultValue);
// or
object this.Getter(string propertyName, object defaultValue);
// where defaultValue is default value for property type for current MappingSchema
static void Setter(Entity object, string propertyName, object value)
or
void this.Setter(string propertyName, object value)
Properties
GetterExpression
Gets or sets name of dynamic properties property get expression.
public LambdaExpression? GetterExpression { get; set; }
Property Value
GetterExpressionMethod
Gets or sets name of dynamic properties property getter expression method or property. Method or property must be static.
public string? GetterExpressionMethod { get; set; }
Property Value
GetterMethod
Gets or sets name of dynamic properties property getter method.
public string? GetterMethod { get; set; }
Property Value
SetterExpression
Gets or sets name of dynamic properties property set expression.
public LambdaExpression? SetterExpression { get; set; }
Property Value
SetterExpressionMethod
Gets or sets name of dynamic properties property setter expression method or property. Method or property must be static.
public string? SetterExpressionMethod { get; set; }
Property Value
SetterMethod
Gets or sets name of dynamic properties property setter method.
public string? SetterMethod { get; set; }
Property Value
Methods
GetObjectID()
Returns mapping attribute id, based on all attribute options.
public override string GetObjectID()
Returns
Validate()
protected void Validate()