2010-05-08から1日間の記事一覧

WCF RIA Servicesで公開したDTOに対してDataAnnotationでバリデーション

MetadataType属性でメタデータ用のクラスを指定します。メタデータ用のクラスには、Requiredとかバリデーションの属性を指定します。 [MetadataType(typeof(EmployeeMetadata))] public class Employee { [Key] public int Id { get; set; } public string N…