Class EntityHasPivotAttribute
Indicates this entity contains information held in a sub table that can be pivotted and displayed against this record too.
This will ensure exports, and imports will allow reference to the pivotted values against this entity record too
Inherited Members
Namespace: LemonEdge.API.Attributes
Assembly: LemonEdge.API.dll
Syntax
[AttributeUsage(AttributeTargets.Interface)]
public sealed class EntityHasPivotAttribute : Attribute
Remarks
For example you could have the following entities: Person +Name Skills +Name SkillCompetencyLevels +SkillID +Name PersonSkill +PersonID +SkillID +SkillCompetencyLevelID This attribute would allow you mark the Person entity as so: [PersonSkillID, nameof(PersonSkill.PersonID), nameof(PersonSkill.SkillID), nameof(PersonSkill.SkillCompetencyLevelID)] Assuming we had the following skills: Accounting, Excel, Coding This would allow you import/export of the person entity with the following headers automatically from the system: PersonID, PersonName, PersonSkill_Accounting, PersonSkill_Excel, PersonSkill_Coding Which you could then populate with skill competency level values for the PersonSkill columns.
Constructors
EntityHasPivotAttribute(EntityID, string, string, string)
Marks this entity as wanting extra columns in export/imports that hold pivotted sub table information
Declaration
public EntityHasPivotAttribute(EntityID id, string pivotLinkColumn, string pivotHeaderColumn, string pivotValueColumn = "")
Parameters
Type | Name | Description |
---|---|---|
EntityID | id | The unique global id of the entity that holds the information to be pivotted as columns against this entity |
string | pivotLinkColumn | The name of the column on that entity that holds a relationship back to this entity |
string | pivotHeaderColumn | The name of the column on that entity that holds values that should be represented as distinct column headers against this entity |
string | pivotValueColumn | The name of the column on that entity that holds the value associated with this entity
for that |
EntityHasPivotAttribute(string, string, string, string)
Marks this entity as wanting extra columns in export/imports that hold pivotted sub table information
Declaration
public EntityHasPivotAttribute(string entityID, string pivotLinkColumn, string pivotHeaderColumn, string pivotValueColumn = "")
Parameters
Type | Name | Description |
---|---|---|
string | entityID | The unique global id of the entity that holds the information to be pivotted as columns against this entity |
string | pivotLinkColumn | The name of the column on that entity that holds a relationship back to this entity |
string | pivotHeaderColumn | The name of the column on that entity that holds values that should be represented as distinct column headers against this entity |
string | pivotValueColumn | The name of the column on that entity that holds the value associated with this entity
for that |
Properties
Info
The definition for the entity that holds pivot information to be displayed alongside this entity
Declaration
public PivotTableInfo Info { get; }
Property Value
Type | Description |
---|---|
PivotTableInfo |