Search Results for

    Show / Hide Table of Contents
    View Source

    Class Relation

    Represents a Relation between two items

    Inheritance
    System.Object
    BeingDirtyBase
    EntityBase
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(IsReference = true)]
    public class Relation : EntityBase, IRelation, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    Relation(Int32, Int32, Guid, Guid, IRelationType)

    Constructor for reconstructing the entity from the data source

    Declaration
    public Relation(int parentId, int childId, Guid parentObjectType, Guid childObjectType, IRelationType relationType)
    Parameters
    Type Name Description
    System.Int32 parentId
    System.Int32 childId
    Guid parentObjectType
    Guid childObjectType
    IRelationType relationType
    View Source

    Relation(Int32, Int32, IRelationType)

    Constructor for constructing the entity to be created

    Declaration
    public Relation(int parentId, int childId, IRelationType relationType)
    Parameters
    Type Name Description
    System.Int32 parentId
    System.Int32 childId
    IRelationType relationType

    Properties

    View Source

    ChildId

    Gets or sets the Child Id of the Relation (Destination)

    Declaration
    [DataMember]
    public int ChildId { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    ChildObjectType

    Declaration
    [DataMember]
    public Guid ChildObjectType { get; set; }
    Property Value
    Type Description
    Guid
    View Source

    Comment

    Gets or sets a comment for the Relation

    Declaration
    [DataMember]
    public string Comment { get; set; }
    Property Value
    Type Description
    System.String
    View Source

    ParentId

    Gets or sets the Parent Id of the Relation (Source)

    Declaration
    [DataMember]
    public int ParentId { get; set; }
    Property Value
    Type Description
    System.Int32
    View Source

    ParentObjectType

    Declaration
    [DataMember]
    public Guid ParentObjectType { get; set; }
    Property Value
    Type Description
    Guid
    View Source

    RelationType

    Gets or sets the RelationType for the Relation

    Declaration
    [DataMember]
    public IRelationType RelationType { get; set; }
    Property Value
    Type Description
    IRelationType
    View Source

    RelationTypeId

    Gets the Id of the RelationType that this Relation is based on.

    Declaration
    [IgnoreDataMember]
    public int RelationTypeId { get; }
    Property Value
    Type Description
    System.Int32
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • Relation(Int32, Int32, Guid, Guid, IRelationType)
      • Relation(Int32, Int32, IRelationType)
    • Properties
      • ChildId
      • ChildObjectType
      • Comment
      • ParentId
      • ParentObjectType
      • RelationType
      • RelationTypeId
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX