public ActionResult <Dica> DeleteDica(Guid id) { try { var dica = _dicaRepository.BuscarPorId(id); if (dica == null) { return(NotFound()); } _dicaRepository.Remover(id); return(Ok(dica)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void Delete(Guid id) { _dicaRepository.Remover(id); }