10
我遇到这种怪异的行为,其中事务都只是承诺之前不提交事务的using
退出,而不是呼吁scope.Complete();
的TransactionScope完成()退出使用声明
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew))
{
scope.Complete();
// data still doesn't show in db
}
// now shows in db
时当如何提交在退出using
声明之前的交易?
可提交事务是唯一提供提交或回滚选项的事务http://msdn.microsoft.com/en-us/library/system.transactions.committabletransaction.aspx – Sankara 2013-04-25 12:15:12