I\'m trying to figure out if there\'s a way to retrieve the (full) sql statement that gets executed on the database server. I found something already, but it does not exactl
I'm using Datacontext.Log property to get the generated SQL Statement (it includes the statement text, and parameters).
Datacontext.Log
Just set YourDataContext.Log = SomeTextWriter.
YourDataContext.Log = SomeTextWriter
It can be written to a file (Log = new StreamWriter(@"c:\temp\linq.log")) or to debug window, see this post
Log = new StreamWriter(@"c:\temp\linq.log")