title: Retrieve LINQ to sql statement (IQueryable) WITH parameters
body: <p>I'm trying to figure out if there's a way to retrieve the (full) sql statement that gets executed on the database server.<br>
  I found something already, but it does not exactly what I would like:  </p>
  
  <pre><code>IQueryable&lt;SomeType&gt; someQuery = ...
  string command = dataContext.GetCommand(query).CommandText;
  </code></pre>
  
  <p>In my case this gives me a command string something like:  </p>
  
  <pre><code>SELECT TOP (50) [t0].[ID], ....
  FROM [dbo].[someTable] AS [t0]
  WHERE ([t0].[someColumn] IS NOT NULL) AND (([t0].[someColumn]) IN (@p0))
  </code></pre>
  
  <p>On database there's executed:  </p>
  
  <pre><code>exec sp_executesql N'SELECT TOP (50) [t0].[ID], ...
  FROM [dbo].[someTable] AS [t0]
  WHERE ([t0].[someColumn] IS NOT NULL) AND (([t0].[someColumn]) IN (@p0, @p1))',N'@p0  int,@p1 int',@p0=401,@p1=201
  </code></pre>
  
  <p>Is there a way to retrieve this 'full' statement (so also the parameter values) from C# code?</p>