public virtual void Validate(TEntity entity) { RegisterValidators(entity); foreach (var validator in _validators) { _notification.AddErrors(validator.Validate()); } if (_notification.HasErrors()) { throw new NotificationException(_notification); } }
protected void AddErrors(ErrorCollection errors) { _notification.AddErrors(errors); }