How can I disable migration in Entity Framework 6.0

后端 未结 7 1556
傲寒
傲寒 2020-11-29 01:24

I\'m trying to ignore the \"Automatic\" migration using Entity Framework 6.0 rc1. My problem is that I don\'t want this feature right now and every time that my application

7条回答
  •  孤独总比滥情好
    2020-11-29 01:52

    If you found this question hoping for a simple answer to disable migrations because you typed "Enable-Migrations" and now things aren't working the way you expected, like not running the seed method you thought it would run, then look in the solution explorer and delete the Migrations folder. That will stop the code from looking at the migrations config to find initialization code. To get the Migrations folder back, just run "Enable-Migrations" again.

提交回复
热议问题