ardalis / ardalis/Specification
Bug: Include PostProcessingAction in CountAsync
- Dominant language
- C#
- Stars
- 2.3k
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
### Context:
`PostProcessingAction` is documented to facilitate in-memory tranformations or filtering:
https://specification.ardalis.com/features/postprocessingaction.html
### Issue:
In a simple scenario we have a `Fullname` computed property which is built from `Firstname` and `Lastname` columns. We use `PostProcessingAction` to implement filtering functionality on the `Fullname`.
Our `ListAsync` call handles this perfectly by filtering the result set correctly. However, our accompanying `CountAsync` ignores the `PostProcessingAction` and gives an incorrect totalcount for our paging implementation.
This does seem to be the intended implementation when looking at this: https://github.com/ardalis/Specification/issues/134#issuecomment-872528093
### Expected result:
`ListAsync` and `CountAsync` should resolve to identical result sets. Since `PostProcessingAction` is documented to facilitate in-memory filtering I expect the `CountAsync` to also resolve the `PostProcessingAction` to respect any in-memory filtering implementations to return the correct count.
Contributor guide
Research direction
Start by comparing the ListAsync and CountAsync paths for PostProcessingAction, then read the linked PostProcessingAction documentation and referenced issue #134. Done means CountAsync respects the same in-memory filtering behavior as ListAsync and returns a matching total for paging, with tests covering the computed Fullname scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100