EFCoreDatabaseUpdateAliases.

EfCoreDatabaseUpdate(ICakeContext, EfCoreDatabaseUpdateSettings) Method

Summary

Applies any pending migrations to the database using the ef.dll migration tool.

Syntax

public static void EfCoreDatabaseUpdate(this ICakeContext context, EfCoreDatabaseUpdateSettings settings)

Examples

Applies any pending migrations to the database using the ef.dll migration tool. ('dotnet ef database update')

var settings = new EfCoreDatabaseUpdateSettings
    {
        WorkingDirectory = @"c:/myproject",
        DbContextClassName = "MyDbContext",
        MigrationsNamespace = "My.Demo.Migrations",
        MigrationDll = "MyMigrations.dll",
        StartupDll = "MyWebUI.dll",
        Verbose = true,
        Version = true
    };
     EfCoreDatabaseUpdate(settings);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings EfCoreDatabaseUpdateSettings The settings.

Return Value

Type Description
void