public override async Task OnAppearing() { await base.OnAppearing(); if (viewModelParameter == null) { Recipe = new RecipeDetailModel(); } else { Recipe = await recipesFacade.GetRecipeAsync(viewModelParameter.Value); OnPropertyChanged("Recipe.FoodType"); } if (IngredientsAll == null) { IngredientsAll = await ingredientsFacade.GetIngredientsAsync(); } if (UnitTexts == null) { UnitTexts = Enum.GetNames(typeof(Unit)).ToList(); } if (FoodTypeTexts == null) { FoodTypeTexts = Enum.GetNames(typeof(FoodType)).ToList(); } }
public override async Task OnAppearing() { await base.OnAppearing(); Recipe = await recipesFacade.GetRecipeAsync(viewModelParameter); }