Andrus <ko********@hot.eewrote:
Are Linq-SQL methods commutative ?
Should the following queries return same or different results ?
var query = query.Skip(n).Take(m);
var query = query.Take(m).Skip(n);
Different results - the first gives results (zero-based) n to n+m-1.
The second gives results 0 to Min(n-1, m-1).
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
World class .NET training in the UK:
http://iterativetraining.co.uk