public IActionResult DeleteEpisode(int id) { AnimeEpisode episode = _animeRepository.GetEpisode(id); if (episode == null) { return(View("404Error")); } _animeRepository.DeleteEpisode(id); return(RedirectToAction("Episodes", new{ id = episode.AnimeId })); }