Geeks With Blogs
Alex Black Another geek coder
1: public class Example 2: { 3: private DbConnection GetConnection() 4: { 5: return null; 6: } 7: 8: public void Test() 9: { 10: // Declare that we need a transaction around this stuff 11: using (TransactionScope scope = new TransactionScope()) 12: { 13: BankAccount bankAccount = new BankAccount(); 14: bankAccount.Deposit(50); 15: bankAccount.Withdraw(50); ......

Copyright © Alex Black | Powered by: GeeksWithBlogs.net