Skip to content

Commit

Permalink
Fixing code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cpluta committed Sep 22, 2019
1 parent 2b889d1 commit 49b620e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/details/orderby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ Ordering is supported in a MongoDB format. This format is as an object with a -1
The following example shows how to sort an object by Name in descending order.

.. code-block:: json
{ "Name": -1 }
The C# implementation allows an alternative for constructing the object.

The following example is the equivalent in C#.

.. code-block:: c#
OrderByDefinition<Person>.OrderByDescending("Name");
// Or
Expand All @@ -25,6 +27,7 @@ To add additional filters it can be extended as follows.
This example will order by Name descending then Age ascending.

.. code-block:: c#
OrderByDefinition<Person>.OrderByDescending("Name").ThenBy("Age");
// Or
Expand Down

0 comments on commit 49b620e

Please sign in to comment.