//[ValidateAntiForgeryToken] public ActionResult DeleteConfirmed(int id) { movieProfile movieprofile = db.movieProfiles.Find(id); db.movieProfiles.Remove(movieprofile); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Content/Delete/5 public ActionResult Delete(int id = 0) { movieProfile movieprofile = db.movieProfiles.Find(id); if (movieprofile == null) { return(HttpNotFound()); } return(View(movieprofile)); }
// [ValidateAntiForgeryToken] public ActionResult Edit(movieProfile movieprofile) { if (ModelState.IsValid) { movieProfile movie = db.movieProfiles.Find(movieprofile.name); db.Entry(movie).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(movieprofile)); }
// [ValidateAntiForgeryToken] public ActionResult Create(movieProfile movie) { if (ModelState.IsValid) { movie.upVote = 0; movie.downVote = 0; db.movieProfiles.Add(movie); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(movie)); }