Beispiel #1
0
        public virtual void Validate(TEntity entity)
        {
            RegisterValidators(entity);

            foreach (var validator in _validators)
            {
                _notification.AddErrors(validator.Validate());
            }

            if (_notification.HasErrors())
            {
                throw new NotificationException(_notification);
            }
        }
Beispiel #2
0
 protected void AddErrors(ErrorCollection errors)
 {
     _notification.AddErrors(errors);
 }