Esempio n. 1
0
        public ClaimsViewModel Registrar(ClaimsViewModel claimViewModel)
        {
            var claims        = Mapper.Map <RegistrarClaimsCommand>(claimViewModel);
            var claimsRetorno = _claimsService.Registrar(claims);

            if (claimsRetorno.ValidationResult.IsValid)
            {
                _unitOfWork.Commit();
            }

            claimViewModel = Mapper.Map <ClaimsViewModel>(claimsRetorno);
            return(claimViewModel);
        }