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

            }
        }