Esempio n. 1
0
        public bool IsValid()
        {
            var validation = new ClientIsVerifiedForRegistration();

            ValidationResult = validation.Validate(this);

            return(ValidationResult.IsValid);
        }
Esempio n. 2
0
        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);
        }