It seems like the PagedList.Core
does not contain the extension method for Html helper, so I cannot use the code below:
@Html.PagedListPager(Model, page => Url.Action("Index", new { page }), PagedListRenderOptions.MinimalWithItemCountText)
I was able to successfully implement the paging in previous version of MVC, but it does not work in ASP.Net Core. Below I have attached IL Dasm reference. Am I missing something, or is there any other way to implement that?
PagedList.Mvc:
PagedList.Core.Mvc:
Include
X.PagedList.Mvc.Core
nuget in your project. Then add this to your view:Then this should work:
I should follow the Instructions of the new version, it is a little different from previous version. I was able to implement the paging with the following code changes:
Startup.cs:
_ViewImports.cshtml:
And finally to use it, we don't use Html tag helper anymore in .Net Core: