Class InsertDataExpression
Represents an expression to insert data into a database table during a migration.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert.Expressions
Assembly: Umbraco.Infrastructure.dll
Syntax
public class InsertDataExpression : MigrationExpressionBase, IMigrationExpression
Constructors
View SourceInsertDataExpression(IMigrationContext)
Initializes a new instance of the InsertDataExpression class with the specified migration context.
Declaration
public InsertDataExpression(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for the insert data expression. |
Properties
View SourceEnabledIdentityInsert
Gets or sets a value indicating whether identity insert is enabled during data insertion.
Declaration
public bool EnabledIdentityInsert { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Rows
Gets the list of InsertionDataDefinition objects representing the rows to be inserted.
Declaration
public List<InsertionDataDefinition> Rows { get; }
Property Value
| Type | Description |
|---|---|
| List<InsertionDataDefinition> |
TableName
Gets or sets the name of the table to insert data into.
Declaration
public string? TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetSql()
Declaration
protected override string GetSql()
Returns
| Type | Description |
|---|---|
| string |