Take a query
dim q = from i in db.test select i.name
Now I use count
to get the complete number of the items.
I use them to get a pager control:
dim count = q.count
Then I use take
and skip
to get my records.
This produces two queries and I wonder if there is a possibility to get the count of all items but to select only 10 of them so that l2s produces just one query.
The columns would then look like:
allcount
- name
This query would give me 10 items, but in the column allcount would be the complete number of all items.