title: With EF6 do I need to use COMMIT and ROLLBACK inside a Stored Procedure?
body: <p>I am using EF to call stored procedures like this:</p>
  
  <pre><code>db.Database.ExecuteSqlCommand(sql, parameters);
  </code></pre>
  
  <p>These procedures do multiple inserts and updates. I added, a TRY region and a COMMIT at the end of the TRY and a ROLLBACK (inside a CATCH) logic but this is giving me an error which I traced back to this:</p>
  
  <p><a href="https://stackoverflow.com/questions/19991609/ef6-wraps-every-single-stored-procedure-call-in-its-own-transaction-how-to-prev">Stackoverflow Explanation</a></p>
  
  <p>If the case is that EF wraps the stored procedure calls then does this mean there is no reason to do that inside the stored procedure or should I leave the COMMIT and ROLLBACK in the SP and do this:</p>
  
  <pre><code>db.Database.ExecuteSqlCommand(TransactionalBehavior.DoNotEnsureTransaction, sql, parameters);
  </code></pre>