How to Enable Migration to update my database in MVC4?

前端 未结 4 1506
时光取名叫无心
时光取名叫无心 2021-01-01 15:03

I\'m working on a project using MVC4 in Visual Studio 2012 and have added a column in the table.

Now when I want to debug my project the error says to use the migrat

4条回答
  •  难免孤独
    2021-01-01 15:27

    Try typing this into the console:

    Enable-Migrations -ContextTypeName Vista.Models.DefaultConnection
    

    Vista.Models.DefaultConnection is your context (the class that inherits from DbContext).

提交回复
热议问题