EntityFramework Core automatic migrations

Solution 1:

You can call context.Database.Migrate()in your Startup.cs

eg:

using (var context = new MyContext(...))
{
    context.Database.Migrate();
}

Solution 2:

EF core doesn't support automatic migrations.So you have to do it manually.

From the perspective of automatic migrations as a feature, we are not planning to implement it in EF Core as experience has showed code-base migrations to be a more manageable approach.

You can read full story here : Not to implement Automatic Migrations