Example #1
0
        public override IEnumerable <BusinessRule> Validate()
        {
            AfficheValidator validator = new AfficheValidator();
            ValidationResult results   = validator.Validate(this);

            foreach (var item in results.Errors)
            {
                yield return(new BusinessRule(item.PropertyName, item.ErrorMessage));
            }
        }
Example #2
0
 public override IEnumerable<BusinessRule> Validate()
 {
     AfficheValidator validator = new AfficheValidator();
     ValidationResult results = validator.Validate(this);
     foreach (var item in results.Errors)
     {
         yield return new BusinessRule(item.PropertyName, item.ErrorMessage);
     }
 }