Reputation: 551
I wrote an MVC C# application which is using a database without Entity Framework. I want to add a paging to my application - most examples of paging I found are using Entity Framework. Can someone point me to examples of paging without EF?
Upvotes: 1
Views: 1629
Reputation: 551
I just found solution which works for me:
List<NumberUI> allPages = _repository.GetAllPages();
int pageSize = 10;
int totalUserCount = allPages.Count();
IPagedList<NumberUI> allPagebleNumbers = allPages.ToPagedList(pageNo, pageSize);
return View(allPagebleNumbers);
zb
Upvotes: 2