public int Put(int id, RestauranteNG restaurante) { try { return(_rest.Update(id, restaurante)); } catch (Exception e) { throw e; } }
public int Post([FromBody] dynamic restaurante) { try { RestauranteNG rest = new RestauranteNG() { id = null, nome = restaurante.nome, pratos = null }; int resp = _rest.Insert(rest); return(resp); } catch (Exception e) { throw e; } }