Class ContentDto
Represents a data transfer object (DTO) for content entities in Umbraco CMS, used for database persistence operations.
Inheritance
object
Namespace: Umbraco.Cms.Infrastructure.Persistence.Dtos
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ContentDto
Constructors
View SourceContentDto()
Declaration
public ContentDto()
Fields
View SourceContentTypeIdColumnName
Declaration
public const string ContentTypeIdColumnName = "contentTypeId"
Field Value
| Type | Description |
|---|---|
| string |
PrimaryKeyColumnName
Declaration
public const string PrimaryKeyColumnName = "nodeId"
Field Value
| Type | Description |
|---|---|
| string |
TableName
Declaration
public const string TableName = "umbracoContent"
Field Value
| Type | Description |
|---|---|
| string |
Properties
View SourceContentTypeId
Gets or sets the identifier of the content type.
Declaration
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
public int ContentTypeId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ContentVersionDto
Gets or sets the content version data transfer object for this content. Represents a one-to-one relationship to the version information of the content item.
Declaration
public ContentVersionDto ContentVersionDto { get; set; }
Property Value
| Type | Description |
|---|---|
| ContentVersionDto |
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
NodeDto
Gets or sets the NodeDto representing the associated node entity for this content. This property establishes a one-to-one relationship between the content and its underlying node data.
Declaration
public NodeDto NodeDto { get; set; }
Property Value
| Type | Description |
|---|---|
| NodeDto |
NodeId
Gets or sets the identifier of the node.
Declaration
[PrimaryKeyColumn(AutoIncrement = false)]
[ForeignKey(typeof(NodeDto))]
public int NodeId { get; set; }
Property Value
| Type | Description |
|---|---|
| int |