public ActionResult Edit(int id) { GalleryVipGuestVM model = new GalleryVipGuestVM() { galleryVipPhotosList = db.galleryVipPhotos.ToList(), galleryVipPhotoSingle = db.galleryVipPhotos.FirstOrDefault(m => m.Id == id), Action = "Edit" }; return(View("Index", model)); }
public ActionResult Index() { GalleryVipGuestVM model = new GalleryVipGuestVM() { galleryVipPhotosList = db.galleryVipPhotos.ToList(), galleryVipPhotoSingle = null, Action = "Create" }; return(View(model)); }