WCF 乱七八糟

ServiceContract   OperationContract

ServiceBehavior   OpenrationBehavior


 [ServiceContract(SessionMode = SessionMode.Allowed)]
   public interface Iservice

 [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
   public class serviceclass : Iservice

------------------------------------------------------------------------------------------

        [ServiceContract]
        public interface IDepositService
        {
             [OperationContract]
             [TransactionFlow(TransactionFlowOption.Allowed)]
             void Deposit(string accountId, double amount);
        }

        public class DepositService : IDepositService
        {
             [OperationBehavior(TransactionScopeRequired = true)]
             public void Deposit(string accountId, double amount)
        }

你可能感兴趣的:(WCF)