public async Task <IActionResult> GetShows(string type, [FromQuery] ShowParameters pagingFilteringParams)
        {
            await CheckIfShowTypeExistsAsync(type);

            if (pagingFilteringParams.PageNumber == 0 || pagingFilteringParams.PageSize == 0)
            {
                var allShows = await _showService.GetShowsAsync(type);

                return(Ok(allShows));
            }

            var shows = await _showService.GetShowsAsync(type, pagingFilteringParams);

            return(Ok(shows));
        }
Example #2
0
        public async Task <IEnumerable <Show> > Get([FromServices] IShowService service, int skip, int take)
        {
            // TODO: map to view model

            return(await service.GetShowsAsync(take, skip));
        }
Example #3
0
        public async Task LoadDataAsync(string title, int pageid)
        {
            TabDatas = await _show.GetShowsAsync(Title, (pageid - 1) *200, 200);

            navPage = await _nav.GetShowsAsync(pageid, 200, title);
        }