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

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

                _applicationServicePerson.Remove(personDTO);
                return(Ok("Person deleted!"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Example #3
0
        public ActionResult Delete([FromBody] PersonDTO personDTO)
        {
            try
            {
                if (personDTO == null)
                {
                    return(NotFound());
                }

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