public async Task <IActionResult> FoodWheel(FoodWheelModel model) { var recipes = await databaseContext.Recipes.ToArrayAsync(); //Getting all recipes from database model.Recipes = recipes; return(View(model)); }
public async Task <IActionResult> FoodWheel() { var recipes = await databaseContext.Recipes.ToArrayAsync(); //Getting all recipes from database var model = new FoodWheelModel { Recipes = recipes }; return(View(model)); //Sending model to foodwheel view }