Search Results for

    Show / Hide Table of Contents
    View Source

    Class EfCoreMigrationExecutor

    Executes Entity Framework Core migrations for Umbraco.

    Inheritance
    object
    Namespace: Umbraco.Cms.Persistence.EFCore
    Assembly: Umbraco.Cms.Persistence.EFCore.dll
    Syntax
    public class EfCoreMigrationExecutor : IEFCoreMigrationExecutor

    Constructors

    View Source

    EfCoreMigrationExecutor(IEnumerable<IMigrationProvider>, IOptions<ConnectionStrings>)

    Initializes a new instance of the EfCoreMigrationExecutor class.

    Declaration
    public EfCoreMigrationExecutor(IEnumerable<IMigrationProvider> migrationProviders, IOptions<ConnectionStrings> options)
    Parameters
    Type Name Description
    IEnumerable<IMigrationProvider> migrationProviders

    The collection of migration providers.

    IOptions<ConnectionStrings> options

    The connection string options.

    Remarks

    We need to do migrations outside of a scope due to SQLite.

    Methods

    View Source

    ExecuteAllMigrationsAsync()

    Executes all pending Entity Framework Core migrations for the current database context asynchronously.

    Declaration
    public Task ExecuteAllMigrationsAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task that represents the asynchronous migration operation.

    View Source

    ExecuteSingleMigrationAsync(EFCoreMigration)

    Asynchronously executes a single Entity Framework Core migration against the database.

    Declaration
    public Task ExecuteSingleMigrationAsync(EFCoreMigration migration)
    Parameters
    Type Name Description
    EFCoreMigration migration
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task that represents the asynchronous execution of the migration.

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