Exemplo n.º 1
0
        public IActionResult Index()
        {
            var recentRecipe  = _recipeData.GetRecentRecipe();
            var starterRecipe = _recipeData.GetRandom(MealType.Entrée);
            var mainRecipe    = _recipeData.GetRandom(MealType.Plat);
            var dessertRecipe = _recipeData.GetRandom(MealType.Dessert);

            return(View(new HomeViewModel {
                RecentRecipe = recentRecipe, RandomStarter = starterRecipe, RandomMainCourse = mainRecipe, RandomDessert = dessertRecipe
            }));
        }