I want to implement pagination using PagedList but the issue is that when I use entity framework, I have to get the whole list for the model and then pass it to the PagedList extension. For large data sets this will take more time.
var result = db.company.ToList().ToPagedList(page?? 1,10);
I want to filter the list of results to the data set that will be displayed and then pass it to PagedList.
Is there any solution for this or some other way to do this type of pagination?