title: EF performing a select on every insert with Identity column
body: <p>I have noticed that when I insert with EF, it performs a select to find the next PK.</p>
  
  <p>I have a PK field with Identity set and auto-increment enabled.</p>
  
  <p>Here is the Query</p>
  
  <pre><code>SELECT [ackId]
  FROM [dbo].[Acks]
  WHERE @@ROWCOUNT &gt; 0 AND [ackId] = scope_identity()
  </code></pre>
  
  <p>I happened to notice it as it was at the top of the Recent Expensive Queries List in SQL Manger Studio. It doesn't quite make sense that the query to find the PK is more expensive than the actual insert?</p>
  
  <p>Is this normal behaviour? Or is this behaviour causef by entity framework?</p>
  
  <p>Another issue I can think of. If EF is doing a select to get the value, what happens if there are several connections writing to the db? Can there not be a case when the select returns the same value?</p>