title: How to get the sql generated by the entity framework
body: <p>How can I  get the sql script generated by an entity framework query?
  i.e. If I write </p>
  
  <pre><code>entityDataDontext.table1.Where(r =&gt; r.primarykey == 1).First();
  </code></pre>
  
  <p>then how can I get the SQL which should be somewhat like this:</p>
  
  <pre><code>select * from table1 where primarykey = 1
  </code></pre>
  
  <p>Thanks in advance :)</p>