public ActionResult DeleteConfirmed(int id) { EslLevel eslLevel = db.EslLevels.Find(id); db.EslLevels.Remove(eslLevel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,EslLevelName")] EslLevel eslLevel) { if (ModelState.IsValid) { db.Entry(eslLevel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eslLevel)); }
public ActionResult Create([Bind(Include = "Id,EslLevelName")] EslLevel eslLevel) { if (ModelState.IsValid) { db.EslLevels.Add(eslLevel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eslLevel)); }
// GET: Questions/EslLevels/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EslLevel eslLevel = db.EslLevels.Find(id); if (eslLevel == null) { return(HttpNotFound()); } return(View(eslLevel)); }