Beispiel #1
0
        public async Task <IActionResult> ShowRecipeInformation(int id)
        {
            var planner = GetLoggedInPlanner();

            var rawRecipeInformation = await _spoonacular.GetRecipeInformation(id);

            SavedRecipe recipeToSave = new SavedRecipe();

            recipeToSave.PlannerId = planner.PlannerId;

            recipeToSave.ImageURL            = rawRecipeInformation.image;
            recipeToSave.RecipeName          = rawRecipeInformation.title;
            recipeToSave.SpoonacularRecipeId = rawRecipeInformation.id;
            recipeToSave.RecipeURL           = rawRecipeInformation.spoonacularSourceUrl;



            return(View("RecipeInformation", recipeToSave));
        }