asp.net2.0事务
做个备份:
TransactionOptions TransOpt = new TransactionOptions();
TransOpt.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
TransOpt.Timeout = new TimeSpan(0, 2, 0);
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, TransOpt))
{
//int tgroupid = tgroup.Add(tgroupinfo);操作
//usersinfo.TgroupID = tgroupid;
//users.Add(usersinfo);
scope.Complete();
}
TransOpt.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
TransOpt.Timeout = new TimeSpan(0, 2, 0);
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, TransOpt))
{
//int tgroupid = tgroup.Add(tgroupinfo);操作
//usersinfo.TgroupID = tgroupid;
//users.Add(usersinfo);
scope.Complete();
}