Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 8th, 2012  |  syntax: None  |  size: 0.30 KB  |  hits: 4  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Transaction for different databases
  2. beginTransaction(){
  3.   dll1.class.Insert(data);
  4.   dll2.className.Insert(relatedData);
  5.   ....
  6. }
  7.        
  8. using (var tx = new TransactionScope())
  9. {
  10.   dll1.class.Insert(data);
  11.   dll2.className.Insert(relatedData);
  12.  
  13.   tx.Complete(); // if not executed, transaction will rollback
  14. }