public ActionResult Create(Restaurant restaurant) { try { restaurant.AddRestaurant(restaurant); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create([Bind(Include = "name, address, city, state, zipCode, phoneNumber")] Restaurant newRestaurant) { try { // TODO: Add insert logic here restaurant.AddRestaurant(newRestaurant); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Restaurant restaurant) { try { restaurant.AddRestaurant(restaurant); // log that it worked return(RedirectToAction("Index")); } catch { // log some problem return(View()); } }
public ActionResult Add(string sRestName, string sAddress) { Restaurant.AddRestaurant(sRestName, sAddress); return(View()); }