public ActionResult Edit(int id) { MenuDinnerImgVM model = new MenuDinnerImgVM() { menuBottomImgAreaFirstsList = db.menuBottomImgAreaFirsts.ToList(), MenuBottomImgAreaFirstSingle = db.menuBottomImgAreaFirsts.FirstOrDefault(m => m.Id == id), Action = "Edit" }; return(View("Index", model)); }
public ActionResult Index() { MenuDinnerImgVM model = new MenuDinnerImgVM() { menuBottomImgAreaFirstsList = db.menuBottomImgAreaFirsts.ToList(), MenuBottomImgAreaFirstSingle = null, Action = "Create" }; return(View(model)); }