title: Entity Framework to read a column but prevent it being updated
body: <p>Given a database table with a column that contains historic data but that is no longer populated, is there a way in Entity Framework to read the column but prevent it being updated when using the same model object?</p>
  
  <p>For example I have an object </p>
  
  <pre><code>public class MyObject
  {
      public string CurrentDataColumnName { get; set; }
      public string HistoricDataColumnName { get; set; }
  }
  </code></pre>
  
  <p>From the documentation I don’t believe I can do either of the following, because this will stop EF reading the data as well as persisting it.</p>
  
  <p>(1) Decorate the <code>HistoricDataColumnName</code> property with the following attribute</p>
  
  <pre><code>[NotMapped]
  </code></pre>
  
  <p>(2) Add the following to my <code>EntityTypeConfiguration</code> for <code>MyObject</code></p>
  
  <pre><code>Ignore(x =&gt; x.HistoricDataColumnName)
  </code></pre>