SkipToken returning invalid next link when combined with select
@xuzhg is already working on this.
Since Jun 14, 2022.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Hi team,
we are using AspNetCore.Odata 8.0.8 for a simple get api with paging.
the Default paging uses Skip - which is causing us regressions with EFC (inefficient query)
in order to improve the performance, we are trying to use SkipToken for generating the next page link instead.
we added the skip token this way:
AddOData(opt =>
{
var edmModel = GetEdmModel();
opt.AddRouteComponents("api", edmModel, ConfigureODataServices).SkipToken();
opt.RouteOptions.EnableNonParenthesisForEmptyParameterFunction = true;
});
this works perfectly when sending a simple get request, however, when the request has a select filter
for example: http://localhost:1059/api/Machines?$select=id
the next link is: "@odata.nextLink": "https://localhost:1059/api/Machines?$select=id&$skiptoken=id-null"
can you help in investigating this bug?
Best,
Nader.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.