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