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