title: Get SQL query from LINQ to SQL?
body: <p>I have a query which I am passing <code>byte[]</code> as a parameter. I am trying to get the SQL query out of it and run that query in management studio to debug. How can I extract the SQL statement from it?</p>
  
  <pre><code> committeeMember =
             db.Committee_Member.FirstOrDefault(x =&gt; x.Customer_Number == activity.Contact.Number
             &amp;&amp; x.Position_Start_Date.Value.Year == activity.EndDate
             &amp;&amp; x.Committee_Id == activity.Committee.Id &amp;&amp; x.Cancelled != 1);
  </code></pre>