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