Select from following answers:- Create the TransactionScope with EnterpriseServicesInteropOption set to Full.
- Create the TransactionScope with TransactionScopeOption set to Suppress.
- Create the TransactionScope with TransactionScopeOption set to RequiresNew.
- All Above
You can use the EnterpriseServicesInteropOption enumeration when you create a new TransactionScope instance to specify the level of interoperability with COM+. By default, when your application code checks the static Current property, System.Transactions attempts to look for a transaction that is otherwise current or a TransactionScope object that dictates that Current is null. If it cannot find either one of these, System.Transactions queries the COM+ context for a transaction. Note that even though System.Transactions might find a transaction from the COM+ context, it still favors transactions that are native to System.Transactions. Full specifies that the ambient transactions for System.Transactions and System.EnterpriseServices are always the same. It results in creating a new System.EnterpriseServices transactional context and applying the transaction that is current for the TransactionScope to be current for that context. As such, the transaction in Current is completely in synchronization with the transaction in Transaction. This value introduces a performance penalty because new COM+ contexts might need to be created.
Show Correct Answer
Source: MeasureUp.Com | Asked In: Many Interviews |
Alert Moderator