Пример #1
0
 public Genre Update(Genre Genre)
 {
     using (var client = new HttpClient())
     {
         HttpResponseMessage response =
             client.PutAsJsonAsync("http://localhost:53416/api/Genre?id=" + Genre.Id, Genre).Result;
         return response.Content.ReadAsAsync<Genre>().Result;
     }
 }
Пример #2
0
        public void Delete(Genre Genre)
        {
            using (var client = new HttpClient())
            {
                HttpResponseMessage response =
                    client.DeleteAsync("http://localhost:53416/api/Genre/" + Genre.Id).Result;

            }
        }