public void setCurrentRecipe(RecipeModel recipeModel) { var recipe = recipeManager.FindRecipe(recipeModel.Name); currentRecipe = new RecipeDescriptionModel(recipe); RaisePropertyChanged("CurrentRecipe"); }
public override void Execute() { try { string recipeName = inputProvider.ReadInput("recipe name"); Recipe recipe = recipeManager.FindRecipe(recipeName); recipeDrawer.Draw(recipe); } catch (RecipeNotFoundBusinessException exception) { throw new PresentationException($"Cannot find recipe '{exception.RecipeName}'.", exception); } }