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