LINQ .Take() returns more elements than requested
We have a simple LINQ-to-Entities query that should return a specific number of elements from particular page. The example of the request can be: var query = from r in records orderby r.createdDate descending select new MyObject() { ... }; //Parameters: pageId = 8, countPerPage = 10 List<MyObject> list = query.Skip(pageId * countPerPage).Take(countPerPage); The above example works great in most of the cases, but sometimes the list has more than 10 elements. This doesn't seem to be always true and depends from the database data. For example, when we request the page 10 and pass countPerPage as