public IActionResult Delete(Guid id) { try { var dica = _dicaRepository.Buscar(id); if (dica == null) { return(NotFound()); } _dicaRepository.Excluir(id); return(Ok(dica)); } catch (Exception ex) { return(BadRequest(ex.Message + ". Envie um email para a nossa equipe de suporte: [email protected]")); } }
public IActionResult Delete(Guid id) { try { var Dica = _dicaRepository.BuscarPorId(id); if (Dica == null) { return(NotFound()); } _dicaRepository.Excluir(id); return(Ok(id)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }