Exemplo n.º 1
0
        // GET: Ingredients
        public ActionResult Index()
        {
            var ingredientDbInterface = new IngredientDAO();
            var allIngredients        = ingredientDbInterface.FetchAllIngredients();

            return(View("IngredientIndex", allIngredients));
        }
Exemplo n.º 2
0
        public ActionResult ProcessIngredientToCreate(Ingredient ingredientToAddToDb)
        {
            var ingredientDbInterface = new IngredientDAO();

            ingredientDbInterface.AddIngredientToDb(ingredientToAddToDb);
            var allIngredients = ingredientDbInterface.FetchAllIngredients();

            return(View("IngredientIndex", allIngredients));
        }