public IActionResult DeleteChapter(int id) { MangaChapter chapter = _mangaRepository.GetChapter(id); if (chapter == null) { return(View("404Error")); } _mangaRepository.DeleteChapter(id); return(RedirectToAction("Chapters", new { id = chapter.MangaId })); }