Murilo Barbosa
Can't access object attributes using X.PagedList
This is how I'm returning it from the Action:
if (!String.IsNullOrEmpty(searchTerm))
{
movies = await _tmdbMovieService.SearchMoviesAsync(searchTerm);
}
var movieResults = movies.results.ToPagedListAsync(pageNumber, pageSize);
return View(movieResults);
10 replies
Can't access object attributes using X.PagedList
I think you are right. But now I'm getting this error InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'System.Threading.Tasks.Task
1[X.PagedList.IPagedList
1[Cinemanage.Models.TMDB.MovieSearchResult]]', but this ViewDataDictionary instance requires a model item of type 'X.PagedList.IPagedList`1[Cinemanage.Models.TMDB.MovieSearchResult]'.10 replies