I was browsing StackOverflow.com today, and ran into this question on doing transactions in Sql Server. Since I was familiar with using SqlTransactions, I thought maybe it was a question I could provide an answer to, but then I saw the response by Anders Abel about TransactionScope. Wow! I had never known this existed and it seemed like a much better way of doing transactional operations without getting into SqlTransaction.
However, Remus Rusanu, commented on Anders’ answer, however, suggesting that this wasn’t the best way to use TransactionScope. He pointed to a blog post by a Microsoftie that gave serious caution to using it “straight up” without some modification. I had a look at the article and I was really excited about using TransactionScope with that technique. I can think of a few places it might have saved me some grief in the past. And I’m posting a link to the MSDN article, “using new TransactionScope() Considered Harmful” here, mainly for my personal future use, but YOU, dear reader, might find this valuable too. So here it is:
using new TransactionScope() Considered Harmful by David Baxter Browne