i have this code..
var documents = from d in db.Documents select d; documents = documents.OrderBy(d => d.Created); documents = documents.Skip(20).Take(10);
In db i have 25 documents (ids from 1 to 25). When i run this code i get documents from id 19 to 24.
If i write it like this
documents = documents.Skip(20);
or like this
documents = documents.Skip(20).ToList().Take(10).AsQueryable();
I get documents from id 20 to 25..
What i am missing here??
Your data is not what you think. The problem is the
created date in
id=25 is not in order.