How can I use my custom method to retrieve string resources and use on properties? For example:
public class Friend
{
[Required(ErrorMessage = "Invalid Name")]
[Display(Name = "Friend's name")]
public string Name { get; set; }
}
The default resource provider (if I set ResourceType
/ErrorMessageResourceType
) will look for a class with a public property, but my resource files doesn't have a generated class, they are plain XML.
I have a method ResourceHelper.Get(key)
which returns the value I expect. How can I change it to use my way of retrieving the resources?