public async Task AddBookGenre(BookGenreModel model) { using (HttpResponseMessage response = await _apiHelper.ApiClient.PostAsJsonAsync("/api/bookgenre/addbookgenre", model)) { if (response.IsSuccessStatusCode == false) { throw new Exception(response.ReasonPhrase); } } }
public void AddBookGenre(BookGenreModel model) { _data.AddBookGenre(model.GenreId, model.BookId); }