“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. —Sir Charles Antony Richard Hoare”
Enterprise Library Validation != 0
There has to be a better way to tell Microsoft’s Enterprise Library’s Validators that zero is invalid…
12345678
[PropertyComparisonValidator("Zero", ComparisonOperator.NotEqual, MessageTemplate = "Entry amount should not be zero", Ruleset = "Standard")]publicdecimalAmount{get{return_entry.Amount;}set{if(IsSelected&&value!=_entry.Amount){_entry.Amount=value;NotifyPropertyChanged("Amount");}}}publicdecimalZero{get{return0.0M;}}