Sub |
Exception | Condition |
---|---|
InvalidOperationException | A sub-transaction can only be active inside an open Transaction. -or- The sub-transaction's current status is not TransactionStatus.Started, therefore it may not be committed or rolled back. |
The parent transaction (or a parent sub-transaction, if any) can still be committed, but the changes rolled back by this method will not be part of the committed transaction.
RollBack can be called only when all inner sub-transaction, if any, are finished, i.e. they were either committed or rolled back. If there is still a sub-transaction open, an attempt to roll this outer sub-transaction back will cause an exception.