您需要将TransactionScope包装在sharedbConnectionScope中,请参见
here
详情。以下内容适用于您的示例
using (SharedDbConnectionScope sharedConnectionScope = new SharedDbConnectionScope()){
{
using (TransactionScope tc = new TransactionScope())
{
uAddress.Save();
ud.AddressId = uAddress.Id;
ud.Save(); // error is here
tc.Complete();
}
}