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