Triggering EF migration at application startup by code

前端 未结 2 1309
野性不改
野性不改 2020-12-10 17:32

Using Entity Framework Migrations (Beta1), using Update-Database command is all good during development.

But when the application is running on some customer\'s serv

2条回答
  •  遥遥无期
    2020-12-10 18:16

    Another options for this issue is to add

    Database.SetInitializer(new MigrateDatabaseToLatestVersion());
    

    line to your Global.asax Application_Start method.

提交回复
热议问题