I have been trying to get the following:
I have a table with 20 elements in it. I’m trying to write a method that gets a number of records, with some kind of an offset.
For example: I would like to get 5 elements, starting from the 6th one… which means I’d like to have record nr 6,7,8,9 and 10.
Those numbers are not a column or id in the table! I would like to sort the table in a specific way with the result id’s get shuffled.
This is my query so far:
project1_category[] categories = db.project1_categories.Select(c => c)
.OrderBy(c => c.Category)
.ToArray();
Any ideas?
Thanks in advance!
You need to use
SkipandTake: