示例#1
0
        // add index action method; needs to be public and return and ActionResult object
        public ActionResult ProfileGallery()
        {
            // passing a _ingredientRepository array to the ingredient variable; this will make the array available
            // via the View's Model property.
            var ingredients = _ingredientsRepository.GetIngredients();

            return(View(ingredients));
        }