Exemplo n.º 1
0
 public Customer Update(Customer customer)
 {
     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/customers/" + customer.ID, customer).Result;
         return response.Content.ReadAsAsync<Customer>().Result;
     }
 }
Exemplo n.º 2
0
 public ActionResult Update(Customer customer)
 {
     facade.GetCustomerGateway().Update(customer);
     return Redirect("Index");
 }
Exemplo n.º 3
0
 public ActionResult Create(Customer customer)
 {
     var returnedCustomer = facade.GetCustomerGateway().Create(customer);
     return Redirect("Index");
 }