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