Leo*_*rdo 10 c# transactions transactionscope distributed-transactions
调查一下,我验证了例如在下面的场景中没有回滚值"myInt"
int myInt = 10;
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew))
{
myInt=20;
Transaction t = Transaction.Current;
t.Rollback();
}
Run Code Online (Sandbox Code Playgroud)
所以它让我想到"TransactionScope是否只回滚与数据库相关的活动?或者事务可以管理其他事情,我不知道那些?"
| 归档时间: |
|
| 查看次数: |
5442 次 |
| 最近记录: |