TranslateResultToActionResult doesn't give PagedInfo
- Dominant language
- C#
- Stars
- 1k
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
While using TranslateResultToActionResult to return responses in the form of ActionResults, there is no way for the caller to know the details of the pagination.
The reason is because the ToActionResult method in the ResultExtensions class just cares about the "result.GetValue()" and ignores the Pagination details which were fed by the upstream services as shown below:
`return Result>.Success(pagedStoryDtos).ToPagedResult(pagedInfo);`
Is there a way we can modify this behavior so that the caller can see the pagination details too?
Contributor guide
Research direction
Start in the ResultExtensions class at ToActionResult and trace how result.GetValue() is mapped from a result created with ToPagedResult(pagedInfo). Review the existing ActionResult and pagination types mentioned by the issue. Done means callers of TranslateResultToActionResult can access the upstream pagination details alongside the returned values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100