Retrieve Products with Server Side Paging
The code below demonstrates how to implement efficient server-side database paging as part of a LINQ query. By using the Skip() and Take() operators below, we'll only return 10 rows from the database - starting with row 200.
Northwinddata db = new Northwinddata();
var products = from p in db.Products where p.Category.CategoryName.startwith("c")
select p).skip(200).Take(10);
Awesome article :)
ReplyDeleteSaved my day!
Thanks a lot.