Select from following answers:- Set TransactionScopeOption to Suppress.

- Remove the TransactionScope using block.
- Open the connection immediately before calling the command and close the connection immediately.
- All Above
Setting TransactionScopeOption to Suppress is useful when you want to preserve the operations performed by the code section and do not want to abort the ambient transaction if the operations fail. For example, you can do this when you want to perform logging or audit operations, or when you want to publish events to subscribers, whether or not your ambient transaction commits or aborts.
Removing the TransactionScope using block does not make the code fail to participate in an ambient transaction if there is one present.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator