title: Entity Framework code first custom fieldd that I don't want to map to DB
body: <p>I'm using EF5. In my domain class I have a field that I do not want to map to the table. But I have to make it public so that other classes can access it:</p>
  
  <pre><code>public class Person
  {
     // these are mapped fields
     public string FirstName {get;set;}
     public string LastName  {get;set;}
  
     // this is intended only for in-memory storage and not saved to DB
     public string LoginFromIP {get;set;}
  }
  </code></pre>
  
  <p>The above code will generated a 'invalid column LoginFromIP' error message when I try to save a new record, because there is NO LoginFromIP in my Person table.</p>
  
  <p>When I remove the setter it works. I guess EF's auto mapping requires both getter and setter. How do I keep my LoginFromIP property to the domain class only without create the field in DB table?</p>
  
  <p>Thanks!</p>