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