public ActionResult DeleteConfirmed(int id) { NavigationName Nav = Db.NavigationNames.Find(id); Db.NavigationNames.Remove(Nav); Db.SaveChanges(); return(RedirectToAction("VIewNag")); }
public ActionResult NewCatagoryAdd(NavigationName ad) { using (var context = new DemoNewEntities()) { context.NavigationNames.Add(ad); context.SaveChanges(); } return(RedirectToAction("VIewNag")); }
public ActionResult Edit([Bind(Include = "NavId,CatagoryName")] NavigationName Var) { if (ModelState.IsValid) { Db.Entry(Var).State = EntityState.Modified; Db.SaveChanges(); return(RedirectToAction("VIewNag")); } return(View(Var)); }
// GET: FiftyTakaData/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } NavigationName Nav = Db.NavigationNames.Find(id); if (Nav == null) { return(HttpNotFound()); } return(View(Nav)); }