mvc contrib pager question - AsPagination
- by csetzkorn
Hi,
I might be wrong but is the AsPagination method not very inefficient as it sucks all the data from a repository first to initialise TotalItems etc.? So paging is not used to make the data access more efficient.
I have not found any examples which use a repository and 'true' paging (i.e. uses TOP etc. in the atcual SQL). How do I use the Pager if I have a repository method with this signature:
IList GetData(int? page, out int TotalItems)
Any feedback would be very much appreciated. Thanks.
Christian