How to implement paging with LINQ

added by kcherupa
2/22/2010 2:44:45 AM


Before going into how paging is implemented with LINQ, Let's discuss the need for implementing paging. With large amounts of data, it is not a good practice to pull all records from database when you are showing a fraction of them in one page. It is always recommended to use data on demand approach. When you want to show first 20 records out of the search results then you must get the first 20 records from database and discard the rest. Similarly...