Hi,
Can you guys tell me the difference between these two objects? Thanks!
Hi,
Can you guys tell me the difference between these two objects? Thanks!
A MySqlTransaction is a MySQL specific implementation of System.Data.IDbTransaction, that is it represents a transaction in a MySQL database.
TransactionScope is used to make blocks of code, not just database calls, transactional.
The TransactionScope will enlist the MySqlTransaction as part of a larger transactional code block so you can perform some database writes and other things as part of the transactionscope and either they will all be committed or they will all be rolled back.
In addition to the answer given by Andrew Kennan. You can also check http://stackoverflow.com/questions/542525/transactionscope-vs-transaction-in-linq2sql/542704#542704