Table of Contents

Class DataFactoryOptions

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

Options how Entities should be generated from the initial data.

[PublicApi]
public class DataFactoryOptions
Inheritance
DataFactoryOptions

Remarks

Added in v15.x but made public in v16.00

Constructors

DataFactoryOptions(DataFactoryOptions, NoParamOrder, int?, string, string, bool?, int?, bool?, Type)

Main Constructor to create such options.

public DataFactoryOptions(DataFactoryOptions original = null, NoParamOrder noParamOrder = default, int? appId = null, string typeName = null, string titleField = null, bool? autoId = null, int? idSeed = null, bool? withMetadata = null, Type type = null)

Parameters

original DataFactoryOptions

Optional initial object which would be used as a template when creating the new one.

noParamOrder NoParamOrder

see Convention: Named Parameters

appId int?

Optional AppId to set on each generated Entity

typeName string

Optional ContentTypeName to use instead of the default

titleField string

Optional Title field to use instead of the default Title

autoId bool?

Determines if items with ID 0 should get an automatic ID

idSeed int?

A root ID seed for numbering the items

withMetadata bool?
type Type

Properties

AllowUnknownValueTypes

public bool AllowUnknownValueTypes { get; init; }

Property Value

bool

AppId

The App-ID which will be assigned to the generated entities. By default, it will be 0

public int AppId { get; }

Property Value

int

AutoId

Determines if Zero IDs are auto-incremented - default is true.

public bool AutoId { get; }

Property Value

bool

IdSeed

public int IdSeed { get; }

Property Value

int

TitleField

The field in the data which is the default title. Defaults to Title if not set.

public string TitleField { get; }

Property Value

string

Type

public Type Type { get; init; }

Property Value

Type

TypeName

The type name to use for a generated Entity.

public string TypeName { get; }

Property Value

string

WithMetadata

public bool WithMetadata { get; init; }

Property Value

bool