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;
     }
 }
Beispiel #2
0
 public ActionResult Update(Order order)
 {
     facade.GetOrderGateway().Update(order);
     return Redirect("Index");
 }
Beispiel #3
0
 public ActionResult Create(Order order)
 {
     var returnedOrder = facade.GetOrderGateway().Create(order);
     return Redirect("Index");
 }