title: "Hide" column from database, but not View in Entity Framework
body: <p>I am using a code-first methodology. I have created my own user model and membership provider.  My model has some of the following fields:</p>
  
  <pre><code>[Table("mytable")]
  public class MyUser
  {
      [Key]
      public int UserId { get; set; } // Auto generated
  
      [Required]
      [DataType(DataType.EmailAddress)]
      [Display(Name = "Email address")]
      public string Email { get; set; }
  
      [Required]
      [DataType(DataType.Password)]
      [Display(Name = "Password")]
      public string Password { get; set; }
  
      [DataType(DataType.Password)]
      [Display(Name = "Confirm password")]
      public string ConfirmPassword { get; set; }
  
      [Display(Name = "Your name/company name")] 
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>The problem is that I don't have a <code>ConfirmPassword</code> column in my database (for obvious reasons). How do I "hide" this from the database, but allow the view to be able to see an use it. Changing it to <code>private</code> hides it from the database, but the view doesn't like that.</p>
  
  <p>How can I tell Entity Framework to ignore this field?</p>