📅  最后修改于: 2022-03-11 15:05:14.035000             🧑  作者: Mango
using(System.Transaction.TransactionScope myScope = new TransactionScope()){
//all of your sql connections and work in here
//call this to commit, else everything will rollback
myScope.Complete();
}