You are integrating a Windows Communication Founda...
单选题

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?()

发布日期:2020-04-10

A.Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new TransactionScope()) block.

B.Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new CommittableTransaction()) block.

C.Add an [OperationBehavior(TransactionScopeRequired=true)] attribute to the ConfirmCreditCard method.

D.Add an [OperationBehavior(TransactionAutoComplete=true)] attribute to the ConfirmCreditCard method.

热门试题

热门资讯

    暂无相关推荐~

分享给好友

分享到朋友圈

取消

使用浏览器的分享功能,把这篇文章分享出去

确定