关于嵌套事务,外部范围给我 "The Transaction has been aborted" 异常,但内部范围 returns 成功

about nested transaction, the outer scope gives me "The Transaction has been aborted" exception, but the inner scope returns succesfully

我遇到了有线问题需要你的帮助。我有嵌套交易。外部方法调用打开另一个事务范围的内部方法 SaveChangesToSource。其实我知道我的底层 sql 可能有问题。我无法理解的是为什么我的内部事务成功完成并且异常被推迟到我调用外部 cope.Complete??

using (TransactionScope scope = new TransactionScope())
{
      SaveChangesToSource(changes);
      scope.Complete();
}


protected override void SaveChangesToSource(IEnumerable<IChange> changes)
{
    using (TransactionScope scope = new TransactionScope())
    {            
         _bl.SaveChanges(changes);
         scope.Complete();
    }
}

MS 文档说,在提交嵌套事务之前,在嵌套事务中所做的更改对于顶级事务是不可见的,即使如此,在提交事务之前,更改在顶级事务之外是不可见的承诺。恕我直言,如果我的解释正确,那么你的外部交易失败将触发你成功的内部交易的回滚。