Debug code-first Entity Framework migration codes

后端 未结 7 751
悲&欢浪女
悲&欢浪女 2020-11-27 10:16

I\'m using Entity Framework code first in my website and I\'m just wondering if there is any way to debug the migration codes. You know, like setting breakpoints and stuff l

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 11:00

    You could add Console.WriteLine statements to the migration code (not a great solution)

    Note, the messages are only shown if you run the migration code using the migrate.exe utility (in pacakges\EntityFramework.x.y.z\tools). They will not display if you run the migration through the Package Manager console.

提交回复
热议问题