Search Results for

    Show / Hide Table of Contents
    View Source

    Class UpdateDataBuilder

    Provides a fluent builder for constructing expressions that update data within database migrations. Use this builder to specify the table, columns, and values to update as part of a migration step.

    Inheritance
    object
    ExpressionBuilderBase<UpdateDataExpression>
    Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Update
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class UpdateDataBuilder : ExpressionBuilderBase<UpdateDataExpression>, IUpdateTableBuilder, IUpdateWhereBuilder, IExecutableBuilder

    Constructors

    View Source

    UpdateDataBuilder(UpdateDataExpression)

    Initializes a new instance of the UpdateDataBuilder class with the specified update data expression.

    Declaration
    public UpdateDataBuilder(UpdateDataExpression expression)
    Parameters
    Type Name Description
    UpdateDataExpression expression

    The UpdateDataExpression that defines the data to be updated in the migration.

    Methods

    View Source

    AllRows()

    Specifies that the update operation should affect all rows in the target table.

    Declaration
    public IExecutableBuilder AllRows()
    Returns
    Type Description
    IExecutableBuilder

    An IExecutableBuilder that can be used to execute the update operation.

    View Source

    Do()

    Executes.

    Declaration
    public void Do()
    View Source

    Set(object)

    Specifies the data.

    Declaration
    public IUpdateWhereBuilder Set(object dataAsAnonymousType)
    Parameters
    Type Name Description
    object dataAsAnonymousType
    Returns
    Type Description
    IUpdateWhereBuilder
    View Source

    Where(object)

    Specifies the data to update for the selected rows.

    Declaration
    public IExecutableBuilder Where(object dataAsAnonymousType)
    Parameters
    Type Name Description
    object dataAsAnonymousType

    An anonymous type object containing the column values to update.

    Returns
    Type Description
    IExecutableBuilder

    An IExecutableBuilder that can be used to execute the update operation.

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