public ActionResult Update(restuarant rest) { // update database and return to index var crud = new DataAccess(); crud.UpdateRest(rest); return(RedirectToAction("Index", "Restuarant")); //return Content(rest.id.ToString() + " " + rest.name + rest.address); }
public ActionResult Create(restuarant rest) { try { var crud = new DataAccess(); crud.AddRestuarant(rest.name, rest.address); return(RedirectToAction("Index", "Restuarant")); } catch { return(RedirectToAction("Index", "Restuarant")); } }