Public list: one round trip for the count and the page
Open
core
enhancement
up-for-grabs
- Dominant language
- C#
- Stars
- 6
- Forks
- 7
- Avg merge
- 4h 21m
- Merged PRs (30d)
- 307
Description
`GET /api/public/{type}` runs `CountAsync` and then `ToListAsync` for one page, two round trips per request (`barakoCMS/Features/Public/Endpoints.cs`, the list handler). Marten's batched querying collapses them into one and does not care about the expression shape, so it works with the runtime `MatchesSql` and `OrderBySql` fragments that ruled out compiled queries in #103.
Done when the list handler issues one batch, a test proves the count and the page still agree, and a before-and-after timing is in the PR. If the batch API refuses `MatchesSql`, say so here and close.
Contributor guide
Assessment
This issue has not been assessed yet.