Entity Framework Migrations: Including Go statement only in -Script output

前端 未结 5 1736
暖寄归人
暖寄归人 2020-12-06 01:17

As part of planning an Entity Framework migration, in order to debug data movement, I would often use the -Script parameter to generate the script.

I could then take

5条回答
  •  一生所求
    2020-12-06 01:43

    I ended up using two different Configuration classes when I run the migrations with and without the -Script parameter. In one of my Configuration classes I wrap its MigrationSqlGenerator in a custom implementation, which adds the GO statements.

提交回复
热议问题