Example #1
0
        public async Task <bool> Update(PessoaFisicaUpdateModel model)
        {
            try
            {
                var entityDb = await _pessoaFisicaRepository.GetById(model.Id);

                var entity = UpdateEntity(entityDb, model);

                _pessoaFisicaRepository.Update(entity);
                _uow.SaveChanges();

                return(true);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }