У меня есть эти два поля в моей модели:
[Required(ErrorMessage="The start date is required")]
[Display(Name="Start Date")]
[DisplayFormat(DataFormatString = "{0,d}")]
public DateTime startDate { get; set; }
[Required(ErrorMessage="The end date is required")]
[Display(Name="End Date")]
[DisplayFormat(DataFormatString = "{0,d}")]
public DateTime endDate{ get; set; }
Я требую, чтобы endDate
был больше, чем startDate
. Я попытался использовать [Compare("startDate")]
, но это работает только для равных операций.
Что я должен использовать для операции "больше"?