public ActionResult Put([FromBody] PersonDTO PersonDTO)
        {
            try
            {
                if (PersonDTO == null)
                {
                    return(NotFound());
                }

                _applicationServicePerson.Update(PersonDTO);
                return(Ok(new Response <string>("Pessoa atualizada com sucesso!")));
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ActionResult Put([FromBody] PersonDTO personDTO)
        {
            try
            {
                if (personDTO == null)
                {
                    return(NotFound());
                }

                _applicationServicePerson.Update(personDTO);
                return(Ok("Person updated!"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Esempio n. 3
0
        public ActionResult Put([FromBody] PersonDTO personDTO)
        {
            try
            {
                if (personDTO == null)
                {
                    return(NotFound());
                }

                _applicationServicePerson.Update(personDTO);
                return(Ok());
            }
            catch (Exception)
            {
                throw;
            }
        }