public ActionResult DeleteConfirmed(string id) { Event_Detail event_Detail = db.Event_Details.Find(id); db.Event_Details.Remove(event_Detail); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id_Number,Starts,Ends")] Event_Detail event_Detail) { if (ModelState.IsValid) { db.Entry(event_Detail).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(event_Detail)); }
public ActionResult Create([Bind(Include = "Id_Number,Starts,Ends")] Event_Detail event_Detail) { if (ModelState.IsValid) { db.Event_Details.Add(event_Detail); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(event_Detail)); }
// GET: Event_Detail/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Event_Detail event_Detail = db.Event_Details.Find(id); if (event_Detail == null) { return(HttpNotFound()); } return(View(event_Detail)); }