Select from following answers:- Set the TransactionScopeOption to RequiresNew.

- Set the TransactionScopeOption to Required.
- Add the Enlist=true setting to the connection strings.
- All Above
The call to the Complete method does not commit the changes. In this case the transaction scope could use an ambient transaction, which could fail independently of this code and cause this code to roll back even after the Complete method was called. Setting the scope of this transaction to RequiresNew always makes it the root scope. It starts a new transaction, and this transaction becomes the new ambient transaction inside the scope. When this code completes the transaction, the changes are completed, committed, and, therefore, persisted.
By default, the transaction scope is Required. If the scope is instantiated with Required and an ambient transaction is present, the scope joins that transaction. This is not the desired behavior.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator