public async Task <PageOf <ApiScopeDto> > HandleAsync(int pageIndex, int pageSize, string sortColumn,
                                                              SortDirection sortDirection, ApiScopeTableList.ApiScopeFilter?filterType, string searchTerm,
                                                              CancellationToken cancellationToken = default)
        {
            var query = _tableList.QueryTableList(filterType, searchTerm);

            return(await _tableList.SelectPage(query, pageIndex, pageSize, sortColumn, sortDirection, cancellationToken));
        }
        public async Task <PageOf <ApiScopeDto> > HandleAsync(int pageIndex, int pageSize, string sortColumn,
                                                              SortDirection sortDirection, ApiScopeTableList.ApiScopeFilter?filterType, string searchTerm, int apiResourceId,
                                                              CancellationToken cancellationToken = default)
        {
            var apiScopesNames = await _apiResourceScopeRepository.Query()
                                 .Where(x => x.ApiResourceId == apiResourceId)
                                 .Select(x => x.Scope)
                                 .ToArrayAsync(cancellationToken);

            var query = _tableList.QueryTableList(filterType, searchTerm)
                        .Where(x => apiScopesNames.Contains(x.Name));

            return(await _tableList.SelectPage(query, pageIndex, pageSize, sortColumn, sortDirection, cancellationToken));
        }