public ActionResult Edit(int id, FormCollection collection) { try { if (ModelState.IsValid) { Models.Restaurant temp = new Models.Restaurant { Id = id, Name = collection["Name"], Address = collection["Address"], City = collection["City"], State = collection["State"], PhoneNumber = collection["PhoneNumber"], }; da.UpdateRestaurant(temp); return(RedirectToAction("Index")); } return(View()); } catch { return(View()); } }