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));
            }
        }
Esempio n. 2
0
 public void Delete(Guid id)
 {
     _dicaRepository.Remover(id);
 }