protected async void btnInsert_Click(object sender, EventArgs e) { if (Page.IsValid) { int idRest = Convert.ToInt16(Session["idRest"]); HttpClient httpClient = new HttpClient(); httpClient.BaseAddress = new Uri(ip); Models.Cardapio f = new Models.Cardapio { Descricao = textBoxDesc.Text, Restaurante_id = idRest }; string s = JsonConvert.SerializeObject(f); var content = new StringContent(s, Encoding.UTF8, "application/json"); await httpClient.PostAsync("/20131011110061/api/cardapio", content); Reload(); } }
public Fila ComCardapio(Cardapio c) { this.Cardapio = c; return this; }
public Produto comCardapioFila(Cardapio c, Fila f) { this.cardapio = c; this.fila = f; return this; }