title: WCF service contract; calling a class method from client
body: <p>Working with WCF service I met the following problem: calling the service from a client (simple console application), I can not access the method of a class marked with [DataContract] and [ServiceContract], even if this method is marked with [OperationContract] (actually, I've tried all the possible combinations of attributes so far :D ). Is there a way to resolve it? I'm missing some points here, I guess, but still can't handle it, need one's help ^^
  Here is the code of a class:</p>
  
  <pre><code>[ServiceContract]
  [DataContract]
  public class AmountSpecification : IOrderSpecification
  {
      [DataMember]
      public int Amount {get ; set;}
  
      public AmountSpecification(int amount)
      {
          Amount = amount;
      }
      public bool IsSatisfiedBy(Order o)
      {
          return o.Amount &gt;= Amount;
      }
  
      [OperationContract]
      public IOrderSpecification And(IOrderSpecification specification)
      {
          return new AndSpecification(this, specification);
      }
  
  }
  </code></pre>