Class EntityLinkToAnyParentRelationshipAttribute
Indicates this property holds a relationship link to an id of any entity in the system. There should also be another property holding the type of entity the id links to marked with IsEntityTypeLink
A relationship to the id of a specific entity is marked with EntityRelationshipAttribute
Inherited Members
Namespace: LemonEdge.API.Attributes
Assembly: LemonEdge.API.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class EntityLinkToAnyParentRelationshipAttribute : PropRelationshipAttribute
Constructors
EntityLinkToAnyParentRelationshipAttribute(string, SingleJoinType, string, bool, params Type[])
Creates a new relationship link specifying this entity can be related to any other entity in the system
Declaration
public EntityLinkToAnyParentRelationshipAttribute(string parentTypePropertyName, SingleJoinType type, string reverseLabel, bool partOfParentSet, params Type[] excludeType)
Parameters
Type | Name | Description |
---|---|---|
string | parentTypePropertyName | The name of the property on this entity that holds an id to any other item in the system |
SingleJoinType | type | The type of relationship: A zero to one, or one to one relationship |
string | reverseLabel | The label to use when specifying the name of this relationship from the linked entities perspective |
bool | partOfParentSet | Indicates if this relationship forms a part of the exportable set of items from the parent entity |
Type[] | excludeType | A list of entity types that can not be linked to from this relationship. By default all entities can be linked if this is null. |
Properties
ExcludedParentTypes
The list of entity types that can not be a parent of this relationship
Can be used to prevent circular relationship references, for performance, or other reasons
Declaration
public IEnumerable<Type> ExcludedParentTypes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Type> |
OnlyWithLabels
Indicates this links to entity descriptors only where they have a label - i.e. are a root entity descriptor of some type, child items wouldn't be included
Declaration
public bool OnlyWithLabels { get; set; }
Property Value
Type | Description |
---|---|
bool |
ParentTypePropertyName
The name of the property on this entity that holds an id to any other item in the system
Declaration
public string ParentTypePropertyName { get; }
Property Value
Type | Description |
---|---|
string |