Skip to content

MetaEntityAttr class

Represents one entity attribute of data model.

public class EasyData.MetaEntityAttr
: IComparable<MetaEntityAttr>

Package: EasyData.Core (targets: netstandard2.0)

Assembly: EasyData.Core.dll

NameTypeDescription
exprstringAttribute expression
NameTypeDescription
CaptionstringGets or sets the attribute’s caption.
ColumnNamestringGets or sets the name of the column associated with property (in EntityFramework context definition).
DataAttrMetaEntityAttr
DataTypeDataTypeGets or sets the type of data represented by attribute.
DefaultEditorValueEditorGets or sets the default value editor.
DescriptionstringGets or sets the description of entity attribute.
DisplayFormatstringThe display format for the attribute.
EntityMetaEntityGets or sets the entity.
ExprstringGets or sets the attribute expression.
FullExprstringGets the full expression of entity attribute.
IdstringGets or sets the ID.
IndexintGets or sets the index of EntityAttr
IsEditableboolGets ot sets a value indicating wether Attribute is editable
IsForeignKeyboolGets ot sets a value indicating wether Attribute is a foreign key
IsNullableboolGets or sets a value indicating whether this attribute is nullable.
IsPrimaryKeyboolGets ot sets a value indicating wether Attribute is a primary key
IsVirtualboolIndicates if this attribute is a virtual (calculate) one.
IsVisibleboolGets ot sets a value indicating wether Attribute is visible
KindEntityAttrKind
LookupAttrMetaEntityAttrGets the lookup attribute.
LookupDataAttributeMetaEntityAttrGets or sets the data attribute in the lookup entity (where the actual values will be saved to).
LookupEntityMetaEntity
ModelMetaDataGets the model.
PropInfoPropertyInfoGets or sets the property information.
PropNamestringGets or sets the name of the property.
ShowInLookupboolGets or sets a value indicating wether Attribute is shown in LookUp editor
ShowOnCreateboolGets ot sets a value indicating wether Attribute is visible during the creation
ShowOnEditboolGets ot sets a value indicating wether Attribute is visible during the edit
ShowOnViewboolGets ot sets a value indicating wether Attribute is visible in a view mode (in grid)
SizeintGets or sets the size of data represented by attribute.
UserDataobjectGets or sets the user data object assosiated with attribute.
NameTypeDescription
CheckModel()voidChecks the Model property and raises an exception if it’s null.
CompareWithExpr(string expr)boolCompares attribute’s expression with the one passed in the parameter.
CopyFrom(MetaEntityAttr attr)voidCopies all attribute’s properties from another entity attribute
GetDataAttrFullExpr()stringGets full expression of the entity attribute.
GetFullCaption(string separator = )stringGets the full name of the attribute (including the name of the parent entity).
GetValueEditor(Nullable<DataType> type = null)ValueEditor
OnModelAssignment()voidCalled when model is assigned.
ProcessVirtualExpr()voidScans attribute’s expression for new parameters, tables, etc
ReadFromJsonAsync(JsonReader reader)TaskReads the attribute content from JSON (asynchronous way).
ReadPropertyFromJsonAsync(JsonReader reader, string propName)TaskReads one attribute’s property from JSON (asynchronous way).
SetDefaultEditorWithoutChecking(ValueEditor editor)voidSets default editor without adding it to model.
WritePropertiesToJsonAsync(JsonWriter writer, BitOptions options)TaskWrites attribute properties to JSON (asynchronous way).