Beispiel #1
0
        public IActionResult Index(string cuisine)
        {
            if (cuisine == null || cuisine.Length == 0)
            {
                // Calls the base class method that gets the user's preferrred cuisine from session state
                cuisine = GetPreferredCuisine();
            }
            else
            {
                // Calls the base class method that sets the user's preferrred cuisine into session state
                SetPreferredCuisine(cuisine);
            }

            // Call the DAO to get Recipes, and pass the list into the view
            return(View(recipeDAO.GetRecipes(cuisine)));
        }
Beispiel #2
0
        public IActionResult Index()
        {
            string cuisine = GetPreferredCuisine();

            return(View(recipeDAO.GetRecipes(cuisine)));
        }
Beispiel #3
0
        public IActionResult Index()
        {
            IList <Recipe> recipes = recipeDAO.GetRecipes(GetPreferredCuisine());

            return(View(recipes));
        }
Beispiel #4
0
 public List <Recipe> GetRecipes()
 {
     return(recipeDAO.GetRecipes());
 }