I'm using MVC 5 along with Entity Framework (6.0.2), one of my classes was generated as:
public partial class Proc_Result
{
public int Id { get; set; }
public string RegistrationNumber { get; set; }
public string Name { get; set; }
public Nullable<System.DateTime> DateOfEntry { get; set; }
public string Drawer { get; set; }
}
I wanted to have it so that the DateOfEntry had a Data Annotation of: [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
Along with being able to add [DisplayName(..)] to the other fields, is this possible? I know I can manually change the generated cs file, but then whenever I update from the db I will loose those changes. Otherwise I could build my own model and map that, but wanted to see if there is another way.
I thought about creating another partial class called Proc_Result, but if I just include the same DateOfEntry, will it override the other one?