Class ElementDto
Represents a data transfer object (DTO) for an element within the Umbraco CMS persistence layer.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.Persistence.Dtos
Assembly: Umbraco.Infrastructure.dll
Syntax
public sealed class ElementDto
Constructors
View SourceElementDto()
Declaration
public ElementDto()
Properties
View SourceContentDto
Gets or sets the ContentDto instance that contains the content data associated with this element.
Declaration
public ContentDto ContentDto { get; set; }
Property Value
| Type | Description |
|---|---|
| ContentDto |
ContentVersionDto
Gets or sets the element version DTO referenced in a one-to-one relationship with this element. Although an element can have multiple versions, this property represents the specific version associated with this instance.
Declaration
public ElementVersionDto ContentVersionDto { get; set; }
Property Value
| Type | Description |
|---|---|
| ElementVersionDto |
Remarks
Although a content has many content versions, they can only be loaded one by one (as several content), so this here is a OneToOne reference.
Edited
Gets or sets a value indicating whether this element has been modified since it was last published or saved.
Declaration
public bool Edited { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
NodeId
Gets or sets the unique identifier for the node associated with this element.
Declaration
[PrimaryKeyColumn(AutoIncrement = false)]
[ForeignKey(typeof(ContentDto))]
public int NodeId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Published
Gets or sets a value indicating whether the element is published.
Declaration
[Index(IndexTypes.NonClustered, Name = "IX_umbracoElement_Published")]
public bool Published { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
PublishedVersionDto
Gets or sets the DTO containing information about the published version of the element.
Declaration
public ElementVersionDto? PublishedVersionDto { get; set; }
Property Value
| Type | Description |
|---|---|
| ElementVersionDto |