MetaEntity class
Represents one entity
public class EasyData.MetaEntity : IComparable<MetaEntity>
Package: EasyData.Core
(targets: netstandard2.0
)
Assembly: EasyData.Core.dll
Properties
Section titled “Properties”Name | Type | Description |
---|---|---|
_model | MetaData | |
Attributes | MetaEntityAttrStore | List of Attributes that belong to this entity. |
ClrType | Type | Gets or sets the type of the entity. |
DbSetName | string | Gets or sets the name of the DbSet associated with entity |
Description | string | Gets or sets the description. |
Id | string | Gets or sets the entity identifier |
Index | int | Gets or sets the index of Entity |
IsEmpty | bool | Gets a value indicating whether this instance is empty. |
IsRoot | bool | Gets a value indicating whether this entity is a root entity. |
Model | MetaData | Gets the model. |
Name | string | Gets or sets the name of the entity. |
NamePlural | string | Gets or sets the name of the entity in plural form. |
Parent | MetaEntity | Gets the parent entity. |
SubEntities | MetaEntityStore | List of sub entities that belong to this entity. |
TypeName | string | Gets or sets the path for building query for complex types |
UserData | object | Gets or sets the user data object associated with entity. |
Methods
Section titled “Methods”Name | Type | Description |
---|---|---|
CreateEntityAttrStore() | MetaEntityAttrStore | |
CreateEntityStore() | MetaEntityStore | |
DeleteSubEntities(String[] namesToDelete) | int | Deletes the sub-entities specified by name(s) passed in method’s parameter(s). |
DeleteSubEntities(Func <MetaEntity, bool > entityToDeleteFilter) | int | Deletes the sub-entities specified by name(s) passed in method’s parameter(s). |
FindAttribute(Func <MetaEntityAttr, bool > predicate) | MetaEntityAttr | |
FindAttributeByCaption(string caption) | MetaEntityAttr | |
FindAttributeByExpression(string expr) | MetaEntityAttr | |
FindAttributeById(string id) | MetaEntityAttr | |
FindSubEntity(string entityName) | MetaEntity | Finds a sub-entity in current entity by its name. |
GetFirstLeaf() | MetaEntityAttr | Gets the first attribute in all attributes and sub-entities of the current entity. |
GetFullName(string separator) | string | Gets the full name. |
ReadFromJsonAsync(JsonReader reader) | Task | Reads the entity content from JSON (asynchronous way). |
ReadOnePropertyFromJsonAsync(JsonReader reader, string propName) | Task | Reads one entity property from JSON (asynchronous way) or skips unused. |
Scan(Action <MetaEntity> entityHandler, Action <MetaEntityAttr> attrHandler, bool processRoot = True) | void | Scans all child entities and attributes (including this one one) calls entityHandler and attrHanlder delegates (correspondingly) for each of them |
WritePropertiesToJsonAsync(JsonWriter writer) | Task | Writes entity’s properties to JSON (asynchronous way). |
WriteToJsonAsync(JsonWriter writer, BitOptions options) | Task | Writes the content of the entity to JSON (asynchronious way) |