title: ASP.NET Entity Framework Hide Model Property from View when Scaffolding
body: <p>I've created a model for my application.  It includes properties (database fields) I want to show and use, and one property I want created in the database but not be visible on the view that is generated during scaffolding.  I want it treated like the ID property is treated.</p>
  
  <pre><code>    [... OTHER CLASS PROPERTIES ABOVE ...]
  
      [Required]
      [Display(Name ="Job Number")]
      public string EntryJobNumber { get; set; }
  
      [Required]
      [Display(Name ="Description")]
      public string EntryDescription { get; set; }
  
      [Required]
      [DataType(DataType.Date)]
      [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
      [Display(Name ="Date")]
      public DateTime EntryDate { get; set; }
  
      [Required]
      [RegularExpression(@"^\d+\.\d{0,2}$")]
      [Range(0, 23.75)]
      [Display(Name ="Time Spent")]
      public decimal EntryHours { get; set; }
  
      public bool EntryExported { get; set; }  // I want this field in the database, but not visible in any of the CRUD views.
  </code></pre>
  
  <p>Is my only option to edit the views and remove the references to "EntryExported"?</p>
  
  <p>SOLVED:  So adding</p>
  
  <pre><code>[ScaffoldColumn(false)]
  </code></pre>
  
  <p>decoration to the model property took care of this.  Thanks to Davide Vitali for pointing me to the solution.</p>