public ActionResult Edit(GalleryEdit gallery) { if (!ModelState.IsValid) { return(View(gallery)); } IGalleryDAC dac = new GalleryDAC(); dac.Update(gallery.GalleryID, gallery.Name, gallery.Description, gallery.SortOrder, gallery.MainImage); return(RedirectToAction("Index")); }