private async void OnSaveBook() { try { Book book = await _booksService.AddOrUpdateBookAsync(Book); Book = book; } catch (ArgumentNullException ex) { MessageBox.Show(ex.Message); } }
private async void OnSaveBook() { try { Book book = await _booksService.AddOrUpdateBookAsync(Book); Book = book; } catch (ArgumentNullException ex) { var dlg = new MessageDialog(ex.Message); await dlg.ShowAsync(); } }
private async Task OnSaveBookAsync() => Book = await _booksService.AddOrUpdateBookAsync(Book).ConfigureAwait(true);
private async void OnSaveBook() { Book = await _booksService.AddOrUpdateBookAsync(Book); }
public async void OnAddBook() { await _booksService.AddOrUpdateBookAsync(Book); _canGetBooks = true; }