ardalis/Result

TranslateResultToActionResult doesn't give PagedInfo

オープン

#71 opened on 2021/08/09

 (5 件のコメント) (3 件のリアクション) (0 人の担当者)C# (126 件のフォーク)github user discovery
enhancementhelp wantedquestion

Repository metrics

Stars
 (1,034 個のスター)
PR merge metrics
 (平均マージ 8d 3h) (30d で 2 merged PRs)

説明

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?

コントリビューターガイド