EF6DatabaseUpdateAliases.

Ef6DatabaseUpdate(ICakeContext, Ef6DatabaseUpdateSettings) Method

Summary

Applies any pending migrations to the database using the ef6.exe migration tool.

Syntax

public static void Ef6DatabaseUpdate(this ICakeContext context, Ef6DatabaseUpdateSettings settings)

Examples

Applies any pending migrations to the database using the ef6.exe migration tool. ('ef6 database update')

var settings = new Ef6DatabaseUpdateSettings
    {
        WorkingDirectory = @"c:/myproject",
        Assembly = "c:/myproject/MyProject.Data.dll",
        Force = true,
        ConnectionStringName = "MyDataDb",
        ConfigurationFile = "c:/myproject/app.config",
        MigrationsConfigurationType = "MyDb.Configuration.Data.MyDbMigrationsConfiguration",
        Verbose = true,
        Version = true
    };
    Ef6DatabaseUpdate(settings);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

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

Return Value

Type Description
void