I have a code that look like this :
public class MyModel
{
[Required]
[Display(Name = "labelForName", ResourceType = typeof(Resources.Resources))]
public string name{ get; set; }
}
The problem is the attribute Display and Required have been added in the generated model class of Entity Framework. I know I can add functionality with Partial but how can I add attribute to a class that will be erase and updated with the ORM?
See Question&Answers more detail:os