备忘
using (TransactionScope scope = new TransactionScope()) { //操作1 XXEntities.Current.SaveChanges(); //操作2 XXEntities.Current.SaveChanges(); //其他Context操作 XXEntities2.Current.SaveChanges(); scope.Complete(); BoshccEntities.Current.AcceptAllChanges(); }
时间: 2024-10-12 19:36:15