Search Results for

    Show / Hide Table of Contents
    View Source

    Class EntitySlim

    Implementation of IEntitySlim for internal use.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models.Entities
    Assembly: Umbraco.Core.dll
    Syntax
    public class EntitySlim : IEntitySlim, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable
    Remarks

    Although it implements IEntitySlim, this class does not implement IRememberBeingDirty and everything this interface defines, throws.

    Although it implements IEntitySlim, this class does not implement IDeepCloneable and deep-cloning throws.

    Constructors

    View Source

    EntitySlim()

    Declaration
    public EntitySlim()

    Fields

    View Source

    Root

    Gets an entity representing "root".

    Declaration
    public static readonly IEntitySlim Root
    Field Value
    Type Description
    IEntitySlim

    Properties

    View Source

    CreateDate

    Gets or sets the creation date.

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

    CreatorId

    Gets or sets the identifier of the user who created this entity.

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

    DeleteDate

    Gets or sets the delete date.

    Declaration
    [DataMember]
    public DateTime? DeleteDate { get; set; }
    Property Value
    Type Description
    DateTime?
    Remarks

    The delete date is null when the entity has not been deleted.

    The delete date has a value when the entity instance has been deleted, but this value is transient and not persisted in database (since the entity does not exist anymore).

    View Source

    HasChildren

    Gets or sets a value indicating whether the entity has children.

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

    HasIdentity

    Gets a value indicating whether the entity has an identity.

    Declaration
    [DataMember]
    public bool HasIdentity { get; }
    Property Value
    Type Description
    bool
    View Source

    Id

    Gets or sets the integer identifier of the entity.

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

    IsContainer

    Gets a value indicating whether the entity is a container.

    Declaration
    [DataMember]
    public virtual bool IsContainer { get; set; }
    Property Value
    Type Description
    bool
    View Source

    Key

    Gets or sets the Guid unique identifier of the entity.

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

    Level

    Gets or sets the level of the entity.

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

    Name

    Gets or sets the name of the entity.

    Declaration
    [DataMember]
    public string? Name { get; set; }
    Property Value
    Type Description
    string
    View Source

    NodeObjectType

    Gets or sets the entity object type.

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

    ParentId

    Gets or sets the identifier of the parent entity.

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

    Path

    Gets or sets the path to the entity.

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

    SortOrder

    Gets or sets the sort order of the entity.

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

    Trashed

    Gets a value indicating whether this entity is trashed.

    Declaration
    [DataMember]
    public bool Trashed { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Trashed entities are located in the recycle bin.

    Always false for entities that do not support being trashed.

    View Source

    UpdateDate

    Gets or sets the last update date.

    Declaration
    [DataMember]
    public DateTime UpdateDate { get; set; }
    Property Value
    Type Description
    DateTime

    Methods

    View Source

    DeepClone()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public object DeepClone()
    Returns
    Type Description
    object
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    GetDirtyProperties()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public IEnumerable<string> GetDirtyProperties()
    Returns
    Type Description
    IEnumerable<string>
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    GetWereDirtyProperties()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public IEnumerable<string> GetWereDirtyProperties()
    Returns
    Type Description
    IEnumerable<string>
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    IsDirty()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public bool IsDirty()
    Returns
    Type Description
    bool
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    IsPropertyDirty(string)

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public bool IsPropertyDirty(string propName)
    Parameters
    Type Name Description
    string propName

    The property name.

    Returns
    Type Description
    bool
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    ResetDirtyProperties()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public void ResetDirtyProperties()
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    ResetDirtyProperties(bool)

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public void ResetDirtyProperties(bool rememberDirty)
    Parameters
    Type Name Description
    bool rememberDirty

    A value indicating whether to remember dirty properties.

    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    ResetIdentity()

    Resets the entity identity by clearing the Id and Key properties.

    Declaration
    public void ResetIdentity()
    View Source

    ResetWereDirtyProperties()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public void ResetWereDirtyProperties()
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    SetParent(ITreeEntity?)

    Sets the parent entity.

    Declaration
    public void SetParent(ITreeEntity? parent)
    Parameters
    Type Name Description
    ITreeEntity parent
    Remarks

    Use this method to set the parent entity when the parent entity is known, but has not been persistent and does not yet have an identity. The parent identifier will be retrieved from the parent entity when needed. If the parent entity still does not have an entity by that time, an exception will be thrown by ParentId getter.

    View Source

    WasDirty()

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public bool WasDirty()
    Returns
    Type Description
    bool
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    View Source

    WasPropertyDirty(string)

    Not implemented. Always throws System.InvalidOperationException.

    Declaration
    public bool WasPropertyDirty(string propertyName)
    Parameters
    Type Name Description
    string propertyName

    The property name.

    Returns
    Type Description
    bool
    Exceptions
    Type Condition
    InvalidOperationException

    Always thrown as this method is not implemented.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX