MVC中的Pagedlist,结果从webapi处理 [英] Pagedlist in MVC with result processed from webapi

查看:107
本文介绍了MVC中的Pagedlist,结果从webapi处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在mvc中实现了Pagedlist的查询。我有一个webapi,它接受输入参数pageno和pagesize并返回结果。

所以,我应该如何仅使用API​​返回的特定结果在mvc中实现分页?由于我有特定pageno所需的表的记录和记录的总 COUNT

我无法在视图上显示分页。因为我只得到一个特定的页面数据。

我应该如何实现这个场景?



任何帮助表示赞赏..



我的尝试:



Hi guys,
I have an query in implementing Pagedlist in mvc. I have an webapi which takes input parameters pageno and pagesize and returns me the result.
so, how should I implement paging in mvc using only the particular result returned by API ? Since I have the total COUNT of records of the table and records required for particular pageno.
I was not able to show paging on view. because I got only a particular page data.
How should I implement this scenario?

Any help appreciated..

What I have tried:

PagedList in MVC and webapi 

推荐答案

Google搜索是你的朋友: c#分页数据 [ ^ ]



目前尚不清楚数据是静态的还是存储在数据库中。所以我会采取一个计算的猜测...使用上述查询的快速Google搜索出现了这个宝石:教程25:通过大量数据进行有效分页 [ ^ ]
Google search is your friend: c# paging data[^]

It's not clear if the data is static or stored in a DB. So I will take a calculated guess ... A quick Google Search using the above query turned up this gem: Tutorial 25: Efficiently Paging Through Large Amounts of Data[^]


从这里开始:

Sorting,Filtering和Paging with ASP.NET MVC应用程序中的实体框架Microsoft Docs [ ^ ]

教程25:有效地分析大量数据 [ ^ ]
Start here:
Sorting, Filtering, and Paging with the Entity Framework in an ASP.NET MVC Application | Microsoft Docs[^]
Tutorial 25: Efficiently Paging Through Large Amounts of Data[^]


这篇关于MVC中的Pagedlist,结果从webapi处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆