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; } }
public void Delete(Category Category) { using (var client = new HttpClient()) { HttpResponseMessage response = client.DeleteAsync("http://localhost:17348/api/Category/" + Category.Id).Result; } }