Search Results for

    Show / Hide Table of Contents
    View Source

    Class MigrationBuilder

    Facilitates the construction and execution of database migrations.

    Inheritance
    object
    Namespace: Umbraco.Cms.Infrastructure.Migrations
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class MigrationBuilder : IMigrationBuilder

    Constructors

    View Source

    MigrationBuilder(IServiceProvider)

    Initializes a new instance of the MigrationBuilder class.

    Declaration
    public MigrationBuilder(IServiceProvider container)
    Parameters
    Type Name Description
    IServiceProvider container

    The service provider used to resolve migration dependencies.

    Methods

    View Source

    Build(Type, IMigrationContext)

    Creates and returns an instance of the specified migration type using the provided migration context. The migration type must inherit from AsyncMigrationBase.

    Declaration
    public AsyncMigrationBase Build(Type migrationType, IMigrationContext context)
    Parameters
    Type Name Description
    Type migrationType

    The System.Type of the migration to instantiate.

    IMigrationContext context

    The IMigrationContext to pass to the migration constructor.

    Returns
    Type Description
    AsyncMigrationBase

    An instance of AsyncMigrationBase created via dependency injection.

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