title: How do I enable nested transactions with ADO.NET and SQL Server?
body: <p>I have similar question to <a href="https://stackoverflow.com/questions/2856020/check-if-a-connection-is-in-a-transaction">how to <em>check</em> if you are in a transaction</a>. Instead of checking, how do I allow nested transactions?</p>
  
  <p>I am using Microsoft SQL Server Database with ADO.NET. I have seen examples using T-SQL and examples starting transactions using begin and using transaction names. When calling connection.BeginTransaction, I call another function in the same connection, and it calls BeginTransaction again which gives me the exception:</p>
  
  <pre><code>SqlConnection does not support parallel transactions.
  </code></pre>
  
  <p>It appears many Microsoft variants allow this, but I can't figure out how to do it with my .mdf file. </p>
  
  <p>How do I allow nested transactions with a Microsoft SQL Server Database using C# and ADO.NET?</p>