public ActionResult Put([FromBody] OngDTO ongDTO) { try { if (ongDTO == null) { return(NotFound(new { message = "Ong inválida!" })); } _applicationServiceOng.Update(ongDTO); return(Ok("Ong Atualizado com sucesso!")); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Banco de dados Falhou - método PUT")); } }
public void Remove(OngDTO obj) { var objEntity = _mapper.Map <Ong>(obj); _serviceOng.Remove(objEntity); }
public void Update(OngDTO obj) { var objEntity = _mapper.Map <Ong>(obj); _serviceOng.Update(objEntity); }
public void Add(OngDTO obj) { var objEntity = _mapper.Map <Ong>(obj); _serviceOng.Add(objEntity); }