private async void AddNewFavorite() { var dialog = new AddOrEditFavoriteDialog(); await dialog.ShowAsync(); if (dialog.ResultFavorite != null) { _favoritesService.AddFavorite(dialog.ResultFavorite); } }
private async void EditFavorite(IFavorite obj) { //bring up the AddOrEdit dialog in Edit mode var dialog = new AddOrEditFavoriteDialog(obj); await dialog.ShowAsync(); if (dialog.ResultFavorite != null) { _favoritesService.EditFavorite(dialog.ResultFavorite); } }