Entity framework manually deleted tables cant be generated from EF migration

前端 未结 4 2086
北恋
北恋 2021-02-20 05:26

I have created migration and created the database and the tables . For example the tables are

A B C D E . Now again I have changed some part of code and ra

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-20 06:07

    IMHO the most straightforward solution is to generate SQL script form the migration and run only a part of the script, that creates missing tables.

    Update-Database -Source MigrationBeforeCreatingTables -Target MigrationAfterCreatingTables -Script
    

提交回复
热议问题