public ActionResult Edit(int id) { GalleryFoodVM model = new GalleryFoodVM() { galleryFoodPhotosList = db.galleryFoodPhotos.ToList(), galleryFoodPhotoSingle = db.galleryFoodPhotos.FirstOrDefault(m => m.Id == id), Action = "Edit" }; return(View("Index", model)); }
public ActionResult Index() { GalleryFoodVM model = new GalleryFoodVM() { galleryFoodPhotosList = db.galleryFoodPhotos.ToList(), galleryFoodPhotoSingle = null, Action = "Create" }; return(View(model)); }