title: Exposing method in datacontract class in wcf
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3734160/adding-methods-to-datacontract-objects-for-wcf">Adding methods to DataContract objects for WCF</a>  </p>
  </blockquote>
  
  
  
  <p>is possible to expose method in data contract class?</p>
  
  <p>ex:</p>
  
  <pre><code>[Datacontract]
  Public Class Customer
  {
      [Datamember]
      Public string ID
      {
          get;set;
      }
  
      Public void AddSession(string key, int len)
      {
  
      }
  
  }
  </code></pre>
  
  <p>how to expose "AddSession" method at client when client consume this service?</p>