Skip to content

Instantly share code, notes, and snippets.

Show actual query generated by Entity Framework.
using (MyContext context = new MyContext())
{
// This will show the SQL in the Output -> Debug window.
context.Database.Log = s => System.Diagnostics.Debug.WriteLine(s);
// LINQ expressions below...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment