public async Task <ActionResult> DeleteConfirmed(int id) { MenuPageWeb menuPageWeb = await db.MenuPageWebs.FindAsync(id); db.MenuPageWebs.Remove(menuPageWeb); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "PageId,SubMenuHeadID,MenuHeadID,PageName,URL,CreateDate,LastUpdateDate,IsRemoved,PageTitle,LiID")] MenuPageWeb menuPageWeb) { if (ModelState.IsValid) { db.Entry(menuPageWeb).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(menuPageWeb)); }
// GET: MenuPageWebs/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MenuPageWeb menuPageWeb = await db.MenuPageWebs.FindAsync(id); if (menuPageWeb == null) { return(HttpNotFound()); } return(View(menuPageWeb)); }