title: Adding custom property to object returned from WCF RIA Services
body: <p>I have a stored procedure in my Entity Framework Model.  I've added a Function Import and mapped the results to a Complex Type.</p>
  
  <p>I want to add an extra property to this Complex type, that I'll populate in my Domain Service, not coming back from the stored procedure.  I added a myClass.shared.cs file and implemented added the property like so:</p>
  
  <pre><code>//myClass.shared.cs
  public partial class myClass
  {
    public string myProperty {get;set;}
  }
  </code></pre>
  
  <p>I populate this in my domain service when I return the object, e.g.:</p>
  
  <pre><code>public myClass GetMyClass(int myClassID)
  {
    myClass theClass= this.ObjectContext.StoredProc(myClassID).FirstOrDefault();
    class.myProperty = 12345;
  
    return theClass;
  }
  </code></pre>
  
  <p>When I get the return values of this method on the client side theClass.myProperty is always null but all values from the stored procedure are populated, am I missing something?</p>
  
  <p>I've tried decorating the myProperty with the <code>[DataMember]</code> attribute but this throws the error:</p>
  
  <blockquote>
    <p>"The type 'myClass' already contains a
    definition for 'myProperty'"</p>
  </blockquote>
  
  <p>How can I get this to return the value set in the Domain Service to the client?</p>