public ActionResult Deletar(int id) { var ret = _servicoRepository.Remove(id); if (ret == 0) { return(NotFound()); } return(NoContent()); }
public IActionResult Delete(int id) { var servico = _repositorio.Find(id); if (servico == null) { return(NotFound()); } _repositorio.Remove(id); return(new NoContentResult()); }