Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion source/fundamentals/builders.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,19 @@ Use builders to check which documents in the collection have a
var builder = Builders<Flower>.Filter;
var filter = builder.AnyEq(f => f.Season, "winter");

.. TODO for a complete list of expressions, see the Query page?
You can also call the ``ElemMatch()`` method to find documents that have an
array field that contains at least one element that matches a specified search
criteria. The following example returns documents that contain the value
``"Summer"`` in their ``Season`` array:

.. code-block:: csharp
:copyable: true

var builder = Builders<Flower>.Filter;
var filter = builder.ElemMatch(f => f.Season, s => s == "Summer");

To learn more about array operators, see the :manual:`Array Query Operators
</reference/operator/query-array/>` guide in the {+mdb-server+} manual.

.. _csharp-builders-projection:

Expand Down
Loading