when I have LINQ-to-SQL query and do a
var count = query.Count();
var list = query.Take(100).ToList();
to get the amount of possible results, but take only the first 100 (eg for paging), I will get two statements fired to the database.
Is it possible to combine this into one SQL statement using LINQ? In plain SQL I can write a single statement that will return the result count and the top 100 results.