我遇到了这种奇怪的行为,只有在using
退出时才提交事务,而不是在调用时提交scope.Complete();
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew))
{
scope.Complete();
// data still doesn't show in db
}
// now shows in db
如何在退出using
语句之前提交事务?