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