public ActionResult Edit(int id) { GalleryInteriorVM model = new GalleryInteriorVM() { galleryInteriorPhotosList = db.galleryInteriorPhotos.ToList(), galleryInteriorPhotosingle = db.galleryInteriorPhotos.FirstOrDefault(m => m.Id == id), Action = "Edit" }; return(View("Index", model)); }
public ActionResult Index() { GalleryInteriorVM model = new GalleryInteriorVM() { galleryInteriorPhotosList = db.galleryInteriorPhotos.ToList(), galleryInteriorPhotosingle = null, Action = "Create" }; return(View(model)); }