Search Results for

    Show / Hide Table of Contents
    View Source

    Class ExecuteBuilder

    Provides a builder for constructing and executing database commands as part of a migration.

    Inheritance
    object
    ExpressionBuilderBase<ExecuteSqlStatementExpression>
    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class ExecuteBuilder : ExpressionBuilderBase<ExecuteSqlStatementExpression>, IExecuteBuilder, IFluentBuilder, IExecutableBuilder

    Constructors

    View Source

    ExecuteBuilder(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 Source

    Do()

    Executes.

    Declaration
    public void Do()
    View Source

    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.

    View Source

    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.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX