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