流利的api映射:
internal class ProjectMap :EntityTypeConfiguration<Project>
{
public ProjectMap()
{
HasKey(o => o.ProjectId);
Property(p => p.ProjectId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
Property(p => p.StartDate < p.ExpectedEndDate);
ToTable(TableSettings.Projects, TableSettings.DefaultSchema);
}
}
这里我想在startdate属性上显示错误消息。那么如何在客户端视图中显示它?