ardalis/Result

TranslateResultToActionResult doesn't give PagedInfo

开放

#71 创建于 2021年8月9日

 (5 条评论) (3 个反应) (0 位负责人)C# (126 个派生)github user discovery
enhancementhelp wantedquestion

仓库指标

星标
 (1,034 个星标)
PR 合并指标
 (平均合并 8天 3小时) (30 天内合并 2 个 PR)

描述

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<IEnumerable<StoryDto>>.Success(pagedStoryDtos).ToPagedResult(pagedInfo);

Is there a way we can modify this behavior so that the caller can see the pagination details too?

贡献者指南