How to add data annotations to partial class?
问题 I have an auto generated class with a property on it. I want to add some data annotations to that property in another partial class of the same type. How would I do that? namespace MyApp.BusinessObjects { [DataContract(IsReference = true)] public partial class SomeClass: IObjectWithChangeTracker, INotifyPropertyChanged { [DataMember] public string Name { get { return _name; } set { if (_name != value) { _name = value; OnPropertyChanged("Name"); } } } private string _name; } } and in another