public bool IsValid() { var validation = new ClientIsVerifiedForRegistration(); ValidationResult = validation.Validate(this); return(ValidationResult.IsValid); }
public new ValidationResult Update(Client client) { var validationResult = new ValidationResult(); if (!client.IsValid()) { validationResult.AddError(client.ValidationResult); return(validationResult); } var validator = new ClientIsVerifiedForRegistration(); var validationService = validator.Validate(client); if (!validationService.IsValid) { validationResult.AddError(client.ValidationResult); return(validationResult); } clientRepository.Update(client); return(validationResult); }