// GET: Ingredients public ActionResult Index() { var ingredientDbInterface = new IngredientDAO(); var allIngredients = ingredientDbInterface.FetchAllIngredients(); return(View("IngredientIndex", allIngredients)); }
public ActionResult ProcessIngredientToCreate(Ingredient ingredientToAddToDb) { var ingredientDbInterface = new IngredientDAO(); ingredientDbInterface.AddIngredientToDb(ingredientToAddToDb); var allIngredients = ingredientDbInterface.FetchAllIngredients(); return(View("IngredientIndex", allIngredients)); }