Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » TransactionScope   (RSS)

Limitation of TransactionScope (and using)

If you read the documentation for TransactionScope , you will find: "If no exception occurs within the transaction scope […], then the transaction in which the scope participates is allowed to proceed. If an exception does occur within the transaction
Posted by florinlazar | 0 Comments
Filed under: ,

A Simpler TransactionScope

In .Net 3.5 I can write a transactional code block as follows: transacted(()=> { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCommand command1 = new SqlCommand(commandString1, connection); command1.ExecuteNonQuery();
Posted by florinlazar | 3 Comments
Filed under:
 
Page view tracker