Table of Contents

Class EntityAssembler

Namespace
ToSic.Eav.Data.Build.Sys
Assembly
ToSic.Eav.Data.Build.dll

This is a helper environment to build entities based on different needs

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class EntityAssembler
Inheritance
object
EntityAssembler

Methods

Create(int, IContentType, NoParamOrder, IReadOnlyDictionary<string, IAttribute>?, int, int, Guid, string?, DateTime?, DateTime?, string?, int, bool, ITarget?, EntityPartsLazy?, int)

public Entity Create(int appId, IContentType contentType, NoParamOrder npo = default, IReadOnlyDictionary<string, IAttribute>? attributes = null, int entityId = 0, int repositoryId = -2742, Guid guid = default, string? titleField = null, DateTime? created = null, DateTime? modified = null, string? owner = null, int version = 0, bool isPublished = true, ITarget? metadataFor = null, EntityPartsLazy? partsBuilder = null, int publishedId = 0)

Parameters

appId int
contentType IContentType
npo NoParamOrder
attributes IReadOnlyDictionary<string, IAttribute>
entityId int
repositoryId int
guid Guid
titleField string
created DateTime?
modified DateTime?
owner string
version int
isPublished bool
metadataFor ITarget
partsBuilder EntityPartsLazy
publishedId int

Returns

Entity

CreateFrom(IEntity, NoParamOrder, int?, IReadOnlyDictionary<string, IAttribute>?, int?, int?, Guid?, IContentType?, bool?, DateTime?, DateTime?, string?, int?, ITarget?, int?, EntityPartsLazy?)

Create a new Entity based on an Entity and replacing some of its properties

public IEntity CreateFrom(IEntity original, NoParamOrder npo = default, int? appId = null, IReadOnlyDictionary<string, IAttribute>? attributes = null, int? id = null, int? repositoryId = null, Guid? guid = null, IContentType? type = null, bool? isPublished = null, DateTime? created = null, DateTime? modified = null, string? owner = null, int? version = null, ITarget? target = null, int? publishedId = null, EntityPartsLazy? partsBuilder = null)

Parameters

original IEntity
npo NoParamOrder
appId int?
attributes IReadOnlyDictionary<string, IAttribute>
id int?
repositoryId int?
guid Guid?
type IContentType
isPublished bool?
created DateTime?
modified DateTime?
owner string
version int?
target ITarget
publishedId int?
partsBuilder EntityPartsLazy

Returns

IEntity

EmptyOfType(int, Guid, int, IContentType)

Create an empty entity of a specific type. Usually used in edit scenarios, where the presentation doesn't exist yet

public Entity EmptyOfType(int appId, Guid entityGuid, int entityId, IContentType type)

Parameters

appId int
entityGuid Guid
entityId int
type IContentType

Returns

Entity