What are the differences between the classic transaction pattern in linq to sql like:
using( var context = Domain.Instance.GetContext() ) {
try {
context.Connection.Open();
context.Transaction = context.Connection.BeginTransaction();
/*code*/
context.Transaction.Commit();
catch(Exception e){
context.Transaction.Rollback();
}
}
vs the TransactionScope object
using( var context = Domain.Instance.GetContext() ) {
using( var scope = new TransactionScope() ){
try {
/*code*/
scope.Complete();
}
catch(Exception e){
}
}
}