コード例 #1
0
 public Category Update(Category Category)
 {
     using (var client = new HttpClient())
     {
         HttpResponseMessage response =
             client.PutAsJsonAsync("http://localhost:17348/api/Category/" + Category.Id, Category).Result;
         return response.Content.ReadAsAsync<Category>().Result;
     }
 }
コード例 #2
0
        public void Delete(Category Category)
        {
            using (var client = new HttpClient())
            {
                HttpResponseMessage response =
                    client.DeleteAsync("http://localhost:17348/api/Category/" + Category.Id).Result;

            }
        }