public Order Update(Order order) { using (var client = new HttpClient()) { //Put (update) movie object as json formatting to our web API localhost HttpResponseMessage response = client.PutAsJsonAsync("http://localhost:13993/api/orders/" + order.ID, order).Result; return response.Content.ReadAsAsync<Order>().Result; } }
public ActionResult Update(Order order) { facade.GetOrderGateway().Update(order); return Redirect("Index"); }
public ActionResult Create(Order order) { var returnedOrder = facade.GetOrderGateway().Create(order); return Redirect("Index"); }