We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c27d20 commit ffba577Copy full SHA for ffba577
docs/40-CRUD/3-ORDER-LIMIT.mdx
@@ -86,5 +86,18 @@ This returns the **top 10 available books** in the "Science Fiction" genre.
86
```
87
</div>
88
</TabItem>
89
+ <TabItem value="csharp" label="C#">
90
+ <div>
91
+ ```csharp
92
+ var projection = Builders<Book>.Projection.Include(b => b.Title).Include(b => b.Pages);
93
+ var descendingPagesSort = Builders<Book>.Sort.Ascending("title");
94
+
95
+ List<Book> sortedBooksLimitedToTen = booksCollection.Find(b => true) // Empty filter to find all books
96
+ .Project<Book>(projection)
97
+ .Sort(descendingPagesSort)
98
+ .Limit(10).ToList();
99
+ ```
100
+ </div>
101
+ </TabItem>
102
</Tabs>
103
</details>
0 commit comments