This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.EntityFrameworkCore.
Summary
Applies any pending migrations to the database using the ef.dll migration tool.
- Assembly
- Cake
.EntityFrameworkCore .dll - Namespace
- Cake
.EntityFrameworkCore .Database - Containing Type
- E
F Core Database Update Aliases
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 |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
settings | Ef |
The settings. |
Return Value
Type | Description |
---|---|
void |