I have the following in my EntityFramework Domain Models:
[Required]
[Display(Name = "First Name")]
public string FirstName { get; set; }
[Required]
[Display(Name = "Last Name")]
public string LastName { get; set; }
And in My view I do the following:
@Html.LabelFor(model => model.FirstName)
But I was wondering, why is it preferred to specify the "Display Name" in my model instead of just writing the Label manually in the View page?
I can actually see this causing more problems, what if in 6 months time someone comes to me and says "We don't want it to say First Name anymore, we want it to say "Your First Name" I would either have to revert to hard coding it in my view or recompile my Model Project for the change to take effect..
Is there any benefits I am not aware of for using data annotations?