Пример #1
0
 private static void PrintCustomer(Customer c)
 {
     Console.WriteLine("{0} {1} {2} {3}",
         c.CustomerId,
         c.CompanyName,
         c.ContactName,
         c.Location.City);
 }
Пример #2
0
 private static Customer UpdateCustomer(HttpClient client, Customer customer)
 {
     const string request = "api/Customer";
     var response = client.PutAsJsonAsync(request, customer).Result;
     response.EnsureSuccessStatusCode();
     var result = response.Content.ReadAsAsync<Customer>().Result;
     return result;
 }