title: EF Code first NotMapped Attribute
body: <p>Why is in the following example the [NotMapped] attribute required:</p>
  
  <pre><code>public virtual ICollection&lt;Blog&gt; Blogs { get; set; }
  
  [NotMapped]
      public List&lt;Blog&gt; NewBlogs{
          get{
              return Blogs.Where(x=&gt;x.Date &gt; DateTime.Now).ToList();
          }
      }
  </code></pre>
  
  <p>Without the [NotMapped] attribute I get an exception:</p>
  
  <blockquote>
    <p>Invalid column name Blog_ID</p>
  </blockquote>
  
  <p>The column name in the database is BlogID.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I would expect, that properties without setter are never directly mapped to the database and automatically ignored by code first.</p>