public ActionResult DeleteConfirmed(int id) { if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Boosters")); } BoosterEvent boosterevent = db.Events.Find(id); db.Events.Remove(boosterevent); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Boosters/Details/5 public ActionResult Details(int id = 0) { if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Boosters")); } BoosterEvent boosterevent = db.Events.Find(id); if (boosterevent == null) { return(HttpNotFound()); } return(View(boosterevent)); }
public ActionResult Edit(BoosterEvent boosterevent) { if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Boosters")); } if (ModelState.IsValid) { db.Entry(boosterevent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(boosterevent)); }
public ActionResult Create(BoosterEvent boosterevent) { if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Boosters")); } if (ModelState.IsValid) { db.Events.Add(boosterevent); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(boosterevent)); }