title: How to avoid creation of additional class while mapping database table to data contract?
body: <p>I have a data contract:</p>
  
  <pre><code>[DataContract]
  public class Entity
  {
     [DataMember]
     public int? Temp
     {
         get;
         set;
     }
     //other properties
  }
  </code></pre>
  
  <p>I need to create <code>Entity</code> objects based on database table information. I have to use <code>SqlDataReader</code> (the requirement) and then map columns to entity properties. I created the auxiliary class which describes mapping using <code>Description</code> attribute:</p>
  
  <pre><code>public class Entity
  {
     [Description("TempColumnName")]
     public int? Temp
     {
         get;
         set;
     }
     //other properties
  }
  </code></pre>
  
  <p>How can I avoid creation of additional class in this case? I think that using data contract property names or decorating data contract with additional attributes is a bad idea. Do you have any suggestions?</p>