public ActionResult Edit([Bind(Include = "Id,Category,ImgUrl,ItemAddonHeading")] MenuCategoryEntity menuCategoryEntity) { if (ModelState.IsValid) { db.Entry(menuCategoryEntity).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(menuCategoryEntity)); }
public ActionResult Edit([Bind(Include = "Id,Name,Phone")] ShopEntity shopEntity) { if (ModelState.IsValid) { db.Entry(shopEntity).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shopEntity)); }
public ActionResult Edit([Bind(Include = "Id,Heading,Description,Price,ImgUrl,MenuCategoryRefId")] MenuItemEntity menuItemEntity) { if (ModelState.IsValid) { db.Entry(menuItemEntity).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MenuCategoryRefId = new SelectList(db.MenuCategories, "Id", "Category", menuItemEntity.MenuCategoryRefId); return(View(menuItemEntity)); }