Which code segment should you insert at line 09?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code segment.

01 [ServiceContract]
02 public interface IMyService
03 {
04 [OperationContract]
05 void MyMethod();
06 }
07 public class SeviceImpl : MyService
08 {
09
10 public void MyMethod(){ }
11 }

You need to ensure that when the MyMethod method is called, the service is the root of a transaction.
Which code segment should you insert at line 09?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You write the following code segment.

01 [ServiceContract]
02 public interface IMyService
03 {
04 [OperationContract]
05 void MyMethod();
06 }
07 public class SeviceImpl : MyService
08 {
09
10 public void MyMethod(){ }
11 }

You need to ensure that when the MyMethod method is called, the service is the root of a transaction.
Which code segment should you insert at line 09?

A.
[OperationBehavior(TransactionScopeRequired=true)]
[TransactionFlow(TransactionFlowOption.Allowed)]

B.
[OperationBehavior(TransactionScopeRequired=true)]
[TransactionFlow(TransactionFlowOption.NotAllowed)]

C.
[OperationBehavior(TransactionScopeRequired=false)]
[TransactionFlow(TransactionFlowOption.Mandatorv)]

D.
[OperationBehavior(TransactionScopeRequired=false)]
[TransactionFlow(TransactionFlowOption.NotAllowed)]



Leave a Reply 0

Your email address will not be published. Required fields are marked *