@@ -27,10 +27,9 @@ which fields MongoDB returns from a query.
2727Sample Data
2828~~~~~~~~~~~
2929
30- The examples in this guide use the ``restaurants`` collection in the ``sample_restaurants``
31- database from the :atlas:`Atlas sample datasets </sample-data>`. To learn how to create a
32- free MongoDB Atlas cluster and load the sample datasets, see the
33- :atlas:`Get Started with Atlas </getting-started>` guide.
30+ The examples in this guide use the ``sample_restaurants.restaurants`` collection
31+ from the :atlas:`Atlas sample datasets </sample-data>`. To learn how to create a
32+ free MongoDB Atlas cluster and load the sample datasets, see the :ref:`<csharp-quickstart>`.
3433
3534The examples on this page use the following ``Restaurant`` and ``Address`` classes to model
3635the documents in the collection:
@@ -57,15 +56,15 @@ To remove the ``_id`` field from the returned document, you must
5756Specify Fields to Include
5857~~~~~~~~~~~~~~~~~~~~~~~~~
5958
60- To specify the fields to include from the result, chain the ``Projection ()`` method
61- to the ``Find()`` method. When calling the ``Projection ()`` method, you must pass in the
59+ To specify the fields to include from the result, chain the ``Project ()`` method
60+ to the ``Find()`` method. When calling the ``Project ()`` method, you must pass in the
6261projection definition as a parameter. You can construct a projection definition by using
6362the ``Builders<T>.Projection.Include()`` method and passing in the field name to include
6463as a parameter. This method can be chained to include multiple fields in the projection.
6564
6665The following example uses the ``Find()`` method to find all restaurants in which the ``name``
67- field value is ``"Emerald Pub"``. Then, the code calls the ``projection()`` and ``exclude ()``
68- methods to instruct the find operation to omit the ``name`` and ``address`` fields
66+ field value is ``"Emerald Pub"``. Then, the code calls the ``Project ()``
67+ method to instruct the find operation to include the ``name`` and ``address`` fields
6968in the result:
7069
7170.. io-code-block::
@@ -112,7 +111,7 @@ excludes the ``_id`` field from the projection:
112111Specify Fields to Exclude
113112~~~~~~~~~~~~~~~~~~~~~~~~~
114113
115- To specify the fields to include from the result, chain the ``Projection ()`` method
114+ To specify the fields to include from the result, chain the ``Project ()`` method
116115to the ``Find()`` method. You can exclude fields in your projection by using
117116the ``Builders<T>.Projection.Exclude()`` method and passing in the field name to exclude
118117as a parameter. This method can be chained to exclude multiple fields in the projection.
0 commit comments