How to Enable Migration to update my database in MVC4?

前端 未结 4 1500
时光取名叫无心
时光取名叫无心 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:23

    If you have small changes not need migration. You can add column to any table on database with sql script and add property to model and delete metadata table. (back up database firstly no doubt).

    Or you can use Migrations like this: aspnet-mvc-4-entity-framework-scaffolding-and-migrations

提交回复
热议问题