DataAnnotations
是否可以在派生类中清除?
public class User
{
[Required(ErrorMessageResourceType = typeof (UserMessages), ErrorMessageResourceName = "BIRTHDATE_REQUIRED")]
public virtual DateTime BirthDate { get; set; }
}
派生类
public class UserModel : User
{
//i dont want data annotations to be used here
[Clear] - something like this
public override DateTime BirthDate{ get; set; }
}