Table of Contents

Class MigrateDbContextTask<T>

Namespace
Steeltoe.CloudFoundry.Connector.EFCore
Assembly
Steeltoe.CloudFoundry.Connector.EFCore.dll

Applies code first migrations for the specified Entity Framework DB Context This task name is "migrate"

public class MigrateDbContextTask<T> : IApplicationTask where T : DbContext

Type Parameters

T

The DBContext which to migrate

Inheritance
MigrateDbContextTask<T>
Implements
Inherited Members

Examples

dotnet run runtask=migrate

Constructors

MigrateDbContextTask(T, ILogger<MigrateDbContextTask<T>>)

public MigrateDbContextTask(T db, ILogger<MigrateDbContextTask<T>> logger)

Parameters

db T
logger ILogger<MigrateDbContextTask<T>>

Properties

Name

Gets globally unique name for the task

public string Name { get; }

Property Value

string

Methods

Run()

Action which to run

public void Run()