Saturday, April 12, 2014

How to debug the Seed() method when using EF 6.0

Add this to the Seed() method
  if (System.Diagnostics.Debugger.IsAttached == false)
      System.Diagnostics.Debugger.Launch();
I have tried to use System.Diagnostics.Debugger.Break(), but that crashed visual studio.

2 comments:

Anonymous said...

Thanks

Rory Aherne said...

Good man, thanks for that