Is there any way to set dynamically the dataannotations according to some values in database?
My requirement is like this:
Display(Name="DispName")]
public string DName{get;set;}
Instead of hardcoding Name="DispName" for Display DataAnnotation, I want to fetch some value from DataBase and fit int the Name attribute. like:
[Display(Name=SomeValueFromDB)]
public string DName{get;set;}
This should be done using t4 template also.
Is there any way to accomplish this?
Regards,
Sujith