0

I am able to Upgrade/downgrade recent changes in my database by using below commands

For Upgrade : In Package Manager Console used below command

pm > Add-Migration <Column Name> 

For Downgrade : In Package Manager Console used below command

pm > Update-Database –TargetMigration:"ColumnName"

Can any one help how to Upgrade/Downgrade multiple columns in multiple tables.

4

1 回答 1

0

如果您想对多个更改进行多个更改,只需创建一个包含所有更改的迁移步骤。

  1. 将生成新列的新属性添加到您的实体类中。
  2. add-migration BunchOfColumns

查看BunchOfColumns迁移步骤,您应该会看到将所有新列添加到类的代码。要降级,只需迁移BunchOfColumns作为目标迁移。

于 2012-05-13T11:15:57.230 回答