protected async Task HandlePageChanged(int selectedPage) { Page = selectedPage; var data = await TVService.GetPopularTVAsync(Page); SetTVData(data); }
protected override async Task OnInitializedAsync() { var movieResults = await MovieService.GetUpcomingMoviesAsync(); var tvResults = await TVService.GetPopularTVAsync(); if (movieResults is not null && tvResults is not null) { UpcomingMovies = movieResults.Results; PopularTVShows = tvResults.Results; } }
protected override async Task OnInitializedAsync() { var popularTvShows = await TVService.GetPopularTVAsync(); var topRatedTvShows = await TVService.GetTopRatedTVAsync(); var onTheAirTvShows = await TVService.GetOnTheAirTVAsync(); if (popularTvShows is not null && topRatedTvShows is not null && onTheAirTvShows is not null) { PopularTVShows = popularTvShows.Results; TopRatedTVShows = topRatedTvShows.Results; OnTheAirTVShows = onTheAirTvShows.Results; } }
protected override async Task OnInitializedAsync() { var data = await TVService.GetPopularTVAsync(Page); SetTVData(data); }