1

Is there a nice way to split a collection into 'n' parts in other list in C# , I have big list of Bson Documents about 1 Millions items and need to split this in multiple list ....

ihssan
  • 87
  • 4
  • 10

1 Answers1

1

if linq support Mongodb then you may do some thing like that

return result.Skip(rowstoSkip).Take(listlength).Tolist();

as result is your query, rowtoSkip is the count of rows you take in previous lists, listLength is the required length of sub list.

Abdullah
  • 38
  • 3