title: Linq To Sql and identity_insert
body: <p>I am trying to do record inserts on a table where the Primary Key is an <code>Identity</code> field.</p>
  <p>I have tried calling<br />
  <code>mycontext.ExecuteCommand(&quot;SET identity_insert myTable ON&quot;)</code><br />
  but this doesn't do any good.</p>
  <p>I get an error saying <code>IDENTITY_INSERT</code> is <code>OFF</code> when I submit changes.</p>
  <p>How can I turn it <code>ON</code> from the C# code before I submit changes?</p>
  <h2>EDIT</h2>
  <p>I have read that this is because ExecuteCommand's code gets executed in a different session.</p>
  <h2>EDIT 2</h2>
  <p>Is there any way I can execute some DDL to remove the Identity Specification from my C# code, do the inserts, and then turn Identity Specification back on?</p>