public ActionResult Edit(RestaurantInput input) { if (!ModelState.IsValid) { return View("Create", input); } var rest = Db.Get<Restaurant>(Convert.ToInt32(input.Id)); rest.Name = input.Name; return Json(new { }); }
public ActionResult Edit(RestaurantInput input) { if (!ModelState.IsValid) { return(View("Create", input)); } var rest = Db.Get <Restaurant>(Convert.ToInt32(input.Id)); rest.Name = input.Name; return(Json(new { })); }
public ActionResult Create(RestaurantInput input) { if (!ModelState.IsValid) { return View(input); } var restaurant = Db.Get<Restaurant>(input.Id); restaurant.Name = input.Name; restaurant.IsCreated = true; return Json(new { }); }
public ActionResult Create(RestaurantInput input) { if (!ModelState.IsValid) { return(View(input)); } var restaurant = Db.Get <Restaurant>(input.Id); restaurant.Name = input.Name; restaurant.IsCreated = true; return(Json(new { })); }