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, Action<EfCoreDatabaseUpdateSettings> configurator)
Examples
Applies any pending migrations to the database using the ef.dll dotnet tool. ('dotnet ef database update')
EfCoreDatabaseUpdate(context, settings =>
{
settings
.FromPath(@"c:/myproject")
.SetDbContextClass("MyDbContext")
.SetMigrationsDll("MyMigrations.dll")
.SetMigrationsNamespace("My.Demo.Migrations")
.SetStartupDll("MyWebUI.dll")
.SetTargetMigration("20201221_MyTable_Change")
.SetVersion()
.SetNoColor()
.SetVerbose();
});
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
configurator | Action |
The settings configurator. |
Return Value
Type | Description |
---|---|
void |