public ActionResult Index()
        {
            HomeViewModels model = new HomeViewModels();

            EditionLastAndNewRecipes.MeilleuresRecettes(model.LastAndBest.lastRecipes);
            EditionLastAndNewRecipes.DernieresRecettes(model.LastAndBest.bestRecipes);
            return(View(model));
        }
Beispiel #2
0
        public ActionResult Recettes()
        {
            EditionLastAndNewRecipes.MeilleuresRecettes(model.NewAndBest.lastRecipes);
            EditionLastAndNewRecipes.DernieresRecettes(model.NewAndBest.bestRecipes);
            var IngInList = db.Ingredient.ToList();
            List <SelectListItem> items = new List <SelectListItem>();

            foreach (var Ing in IngInList)
            {
                var item = new SelectListItem
                {
                    Value = Ing.id.ToString(),
                    Text  = Ing.name
                };
                items.Add(item);
            }
            MultiSelectList IngList = new MultiSelectList(items.OrderBy(i => i.Text), "Value", "Text");

            model.SelectIng = IngList;

            return(View(model));
        }