public ActionResult <IList <Watchlist> > GetWatchlistByPlaylistId(int playlistId) { HttpContext.Session.SetInt32("playlistId", playlistId); var item = _watchlistRepository.GetMoviesByPlaylistId(playlistId).OrderByDescending(i => i.Id); if (item == null) { return(NotFound()); } ViewBag.movieList = item; return(View("../User/MoviesInsidePlaylist")); }