public ActionResult DeleteConfirmed(int id) { CriticRatingLoader criticRatingLoader = db.CriticRatingLoaders.Find(id); db.CriticRatingLoaders.Remove(criticRatingLoader); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CriticRatingId,CriticSiteId,MovieDetailID,Rating")] CriticRatingLoader criticRatingLoader) { if (ModelState.IsValid) { db.Entry(criticRatingLoader).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CriticSiteId = new SelectList(db.CriticSites, "CriticSiteId", "SiteName", criticRatingLoader.CriticSiteId); ViewBag.MovieDetailID = new SelectList(db.MovieDetails, "MovieDetailID", "DetailsUrl", criticRatingLoader.MovieDetailID); return(View(criticRatingLoader)); }
// GET: CriticRatingLoaders/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CriticRatingLoader criticRatingLoader = db.CriticRatingLoaders.Find(id); if (criticRatingLoader == null) { return(HttpNotFound()); } return(View(criticRatingLoader)); }
// GET: CriticRatingLoaders/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CriticRatingLoader criticRatingLoader = db.CriticRatingLoaders.Find(id); if (criticRatingLoader == null) { return(HttpNotFound()); } ViewBag.CriticSiteId = new SelectList(db.CriticSites, "CriticSiteId", "SiteName", criticRatingLoader.CriticSiteId); ViewBag.MovieDetailID = new SelectList(db.MovieDetails, "MovieDetailID", "DetailsUrl", criticRatingLoader.MovieDetailID); return(View(criticRatingLoader)); }