title: mvc 5: Optional model property
body: <p>I have a model called Project</p>
  
  <pre><code>public class Project
  {
      [Key]
      public int    ID      { set; get; }
      public string Title   { set; get; }
      public string Image   { set; get; }
      public double? gained { set; get; }
  }
  </code></pre>
  
  <p>I use this model with two stored procedures one returns all the properties and the other without the property <code>gained</code>. And I got this error</p>
  
  <pre><code>The data reader is incompatible with the specified 'Test.Models.Project'. A member of the type, 'Gained', does not have a corresponding column in the data reader with the same name.
  </code></pre>
  
  <p>I don't want to write separate models for each stored procedure.
  How to solve that please ?</p>