If I have a LINQ to SQL statement for example
var query = (from a in this.Context.Apples select a.Name).ToList();
When I want to see what SQL is being generated by LINQ
, what I do is that I comment out the ToList()
and put a breakpoint on the command after this LINQ
statement and then I can hover it and read the SQL.
My question: Is that a correct way of getting the generated SQL?