In .NET 2, there's a new System.Transactions.TransactionScope class. It basically allows you to do implicit transactions just by creating a new TransactionScope. It's stored in TLS and things like SqlConnection check it and auto-enlist. A sample:using (TransactionScope txScope = new TransactionScope) {insertSomethingIntoDB();processCreditCard();txScope.Complete();}
Remember Me