As you know, when we generate a model using the entity framework those files are automatically generated and manual changes will be overwritten if we change the model.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
My question is, how can we keep those manual changes in place?
[DataType(DataType.Date)]
[Required(ErrorMessage = "Please enter a date")]
public Nullable<System.DateTime> date { get; set; }
It's pretty hard to maintain any manual changes, like the one above, made to those classes.
What kind of strategy would you use to solve this kind of problem?