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 that LINQ generating SQL, I do this by commenting out ToList() and putting a breakpoint in the command after this LINQ statement, and then I can point it and read the SQL.
My question is: is this the correct way to get the generated SQL?
c # linq
Bohn
source share