title: What is the best way to rollback a .net transaction?
body: <p>This question is related to my question: <a href="https://stackoverflow.com/questions/3072986/sql-server-and-transactionscope-with-msdtc-sporadically-cant-get-connection">SQL Server and TransactionScope (with MSDTC): Sporadically can&#39;t get connection</a></p>
  
  <p>I'm doing some transaction programming using the .net <code>TransactionScope</code> class.  If I understand correctly, I can do some SQL operations within a transaction by wrapping the SQL calls inside a <code>using ts as new TransactionScope()</code> block, or by using <code>new TransactionScope()</code> and then <code>TransactionScope.Dispose()</code> at the end.</p>
  
  <p>To commit the transaction, MSDN says to use <code>TransactionScope.Commit()</code>.  Supposing that I want to rollback the transaction under certain circumstances, is it sufficient to simply call <code>TransactionScope.Dispose()</code> without calling the Commit method first?  Is that good practice, or is this supposed to be done some other way?</p>