Monday, February 8, 2016

Debugging Seed method in Entity Framework

This is a quick post on how you can debug the Seed method. When you run Update-Database, the seed will be running silently and there are sometimes that we need to debug it.

Just insert the following code snippet to the Seed method.
if (System.Diagnostics.Debugger.IsAttached == false)
{
    System.Diagnostics.Debugger.Launch();
}
Happy Coding.

Regards,
Jaliya

No comments:

Post a Comment