mvc contrib pager question - AsPagination

Posted by csetzkorn on Stack Overflow See other posts from Stack Overflow or by csetzkorn
Published on 2011-01-07T15:02:18Z Indexed on 2011/01/08 8:54 UTC
Read the original article Hit count: 285

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

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about mvccontrib