Debug code-first Entity Framework migration codes

后端 未结 7 708
悲&欢浪女
悲&欢浪女 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:11

    I also found a neat trick here to get the error details...

    Basically, the trick is to grab all the information from an exception, put it in a string and throw a new DbEntityValidationException with the generated string and the original exception.

    0 讨论(0)
提交回复
热议问题