Class ExecuteBuilder
Provides a builder for constructing and executing database commands as part of a migration.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ExecuteBuilder : ExpressionBuilderBase<ExecuteSqlStatementExpression>, IExecuteBuilder, IFluentBuilder, IExecutableBuilder
Constructors
View SourceExecuteBuilder(IMigrationContext)
Initializes a new instance of the ExecuteBuilder class with the specified migration context.
Declaration
public ExecuteBuilder(IMigrationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationContext | context | The IMigrationContext to use for this builder. |
Methods
View SourceDo()
Executes.
Declaration
public void Do()
Sql(Sql<ISqlContext>)
Specifies the SQL statement to execute as part of a migration.
Declaration
public IExecutableBuilder Sql(Sql<ISqlContext> sql)
Parameters
| Type | Name | Description |
|---|---|---|
| Sql<ISqlContext> | sql | The SQL statement to execute. |
Returns
| Type | Description |
|---|---|
| IExecutableBuilder | An IExecutableBuilder that allows further configuration of the migration step. |
Sql(string)
Specifies the SQL statement to be executed as part of the migration.
Declaration
public IExecutableBuilder Sql(string sqlStatement)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sqlStatement | The SQL statement to execute. |
Returns
| Type | Description |
|---|---|
| IExecutableBuilder | An IExecutableBuilder that can be used to continue building the execution. |