[ASP.NET Core 1.0] Automatic Migrations in Entity Framework 7 (EF Core 1.0)

1
Comments
[ASP.NET Core 1.0] Automatic Migrations in Entity Framework 7 (EF Core 1.0)

There is no more public Configuration() { AutomaticMigrationsEnabled = false; } in Entity Framework Core 1.0 (formerly  EF 7.0) Now you can use extension Migrate method during database initialization. For example, you have custom DBInitializer class: public class DBInitialization { public static void Initialize() { using (var context = new DbContext()) { context.Database.Migrate(); // Other db initialization code. } } } There is also async version of this method. This method will apply any pendi...

Read further...