public IActionResult PutDica(Guid id, Dica dica)
        {
            if (id != dica.IdDica)
            {
                return(BadRequest());
            }



            try
            {
                _dicaRepository.Editar(dica);
                return(Ok(dica));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Пример #2
0
 public void Put(Guid id, Dica dica)
 {
     dica.IdDica = id;
     _dicaRepository.Editar(dica);
 }