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)); }
public async Task <IEnumerable <Show> > Get([FromServices] IShowService service, int skip, int take) { // TODO: map to view model return(await service.GetShowsAsync(take, skip)); }
public async Task LoadDataAsync(string title, int pageid) { TabDatas = await _show.GetShowsAsync(Title, (pageid - 1) *200, 200); navPage = await _nav.GetShowsAsync(pageid, 200, title); }