このコードでは..
public static TransactionScope CreateTransactionScope(bool createNew = false)
{
return new TransactionScope(
createNew ? TransactionScopeOption.RequiresNew : TransactionScopeOption.Required,
new TransactionOptions() { IsolationLevel = IsolationLevel.ReadCommitted });
}
実はこの中に…
using (TransactionScope rootScope = CreateTransactionScope())
{
using (TransactionScope nestedOne = CreateTransactionScope())
{ nestedOne.Complete(); }
using (TransactionScope nestedTwo = CreateTransactionScope(true))
{ nestedTwo.Complete(); }
// No committing, rollback 'rootScope'.
}
ルート トランザクションと一緒にロールバックされるトランザクションはどれnestedOne
ですか。nestedOne
nestedTwo