public Task <IApiResponse <PagedModel <RankingResponse> > > RangeQuery(PageQueryRequest <RankingRequest> model) => conn.SendAsync <PageQueryRequest <RankingRequest>, PagedModel <RankingResponse> >( isPolly: true, isAnonymous: true, isSecurity: false, method: HttpMethod.Post, requestUri: "api/ExternalTransaction/table", request: model, cancellationToken: default);
public IAsyncEnumerable <string> Search(IPageRepository repository, PageQueryRequest query, CancellationToken cancellationToken = default) { var qr = repository.GetAllItems(cancellationToken).IgnoreNull(); if (string.IsNullOrEmpty(query.Route)) { qr = qr.Where(x => x.Route.StartsWith(query.Route)); } if (!string.IsNullOrWhiteSpace(query.Term)) { qr = qr.Where(x => x.Title.ToString().Contains(query.Term) || x.Content.ToString().Contains(query.Term) ); } return(qr.Select(item => item.Id).Paging(query.Pagination)); }