public ActionResult Edit([Bind(Include = "Id,Nome")] model.Cardapio cardapio) { if (ModelState.IsValid) { new data.Cardapio().Update(cardapio); return(Redirect(Request.UrlReferrer.AbsolutePath)); } return(View(cardapio)); }
public ActionResult ItemCreated([Bind(Include = "Id,Nome")] model.Cardapio cardapio) { if (ModelState.IsValid) { new biz.Cardapio().CriarCardapio(cardapio); return(Redirect(Request.UrlReferrer.AbsolutePath)); } return(View(cardapio)); }