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)
        }

posted @ 2012-05-03 09:12  webglcn  阅读(129)  评论(0编辑  收藏  举报