70-513 · Question #313
You are integrating a Windows Communication Foundation (WCF) service within an enterprise wide Service Oriented Architecture (SOA). Your service has the following service contract: [ServiceContract]…
The correct answer is C. Add an [OperationBehavior(TransactionScopeRequired=true)] attribute to the. See the full explanation below for the reasoning.
Question
You are integrating a Windows Communication Foundation (WCF) service within an enterprise wide Service Oriented Architecture (SOA). Your service has the following service contract:
[ServiceContract] public class CreditCardConfirmationService { [OperationContract] boolean ConfirmCreditCard(string ccNumber); double OrderAmount(int orderNumber); } You need to allow the code in the ConfirmCreditCard method to participate automatically in existing transactions. If there is no existing transaction, a new transaction must be created automatically. What should you do?
Options
- AInside the ConfirmCreditCard method, surround the code that must participate in the
- BInside the ConfirmCreditCard method, surround the code that must participate in the
- CAdd an [OperationBehavior(TransactionScopeRequired=true)] attribute to the
- DAdd an [OperationBehavior(TransactionAutoComplete=true)] attribute to the
How the community answered
(33 responses)- A3% (1)
- B18% (6)
- C73% (24)
- D6% (2)
Community Discussion
No community discussion yet for this question.