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 record DataFactoryOptions : IEquatable<DataFactoryOptions>
Inheritance
object
DataFactoryOptions
Implements

Remarks

Tip

This is a record since v19.01, which makes it simpler to use and understand. all the properties are init only, but the docs and the DNN DLLs require that they are set as well. This will not be supported in future, so ensure that you only set the properties on init.

History

  • Added in v15.x but made public in v16.00
  • Changed to be a record in v19.01 to make things simpler; this could be a breaking change, because the old constructor was removed.

Properties

AllowUnknownValueTypes

public bool AllowUnknownValueTypes { get; set; }

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; set; }

Property Value

int

AutoId

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

public bool AutoId { get; set; }

Property Value

bool

IdSeed

ID seed for all items which must be auto-numbered. Default is 1. If the seed is -1 or less, then it will automatically decrement the count. This is to clearly indicate virtual IDs which will not be the same in the next run.

public int IdSeed { get; set; }

Property Value

int

TitleField

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

public string TitleField { get; set; }

Property Value

string

Type

public Type Type { get; set; }

Property Value

Type

TypeName

The type name to use for a generated Entity.

public string TypeName { get; set; }

Property Value

string

WithMetadata

public bool WithMetadata { get; set; }

Property Value

bool