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; } }
public ActionResult Update(Customer customer) { facade.GetCustomerGateway().Update(customer); return Redirect("Index"); }
public ActionResult Create(Customer customer) { var returnedCustomer = facade.GetCustomerGateway().Create(customer); return Redirect("Index"); }