I have a base class with some properties:
public class A
{
[Display(Name = "Some Property")]
public virtual int SomeProperty {get;set;}
}
and its derived class:
public class B:A
{
[Required]
public override int SomeProperty {get;set;}
}
But in fact, when I extract metadata for class B to ModelMetadata, IsRequired property is set to false. Is there a way to apply Required attribute, so it was reflected in ModelMetadata?