EF Core Add Migration Debugging

How can I enter OnModelCreating with a breakpoint and see if my logic is wrong or that ModelBuilder doing something that I do not expect? I have seen many posts on how to debug actual migration, but nothing on how to observe how model code is generated.

I am trying to implement some custom attributes on some of my entities, and this is ignored; I would like to see what my configuration does, as it generates model code.

+11
source share
1 answer

You should be able to call Debugger.Launch() in your code. The debugger should ask you to attach the debugger right on time when it gets to this line.

+19
source

Source: https://habr.com/ru/post/1262843/


All Articles