diff --git a/source/fundamentals/linq.txt b/source/fundamentals/linq.txt index 00c445c6..db1d84bc 100644 --- a/source/fundamentals/linq.txt +++ b/source/fundamentals/linq.txt @@ -426,8 +426,8 @@ documents from the "joined" collection. .. note:: - To perform a lookup, you must make both collections queryable using the - ``AsQueryable`` method. + To perform a lookup, you must make both collections queryable by using the + ``AsQueryable()`` method. To learn how to make a collection queryable, see :ref:`csharp-linq-queryable`. @@ -445,7 +445,7 @@ The following ``Review`` class models the documents in the ``reviews`` collectio :end-before: end-review-model Select the :guilabel:`Method Syntax` or :guilabel:`Query Syntax` tab to see how -to generate a ``$lookup`` stage using LINQ: +to generate a ``$lookup`` stage by using LINQ: .. tabs:: @@ -477,25 +477,37 @@ reviews for that restaurant. A review matches a restaurant if the value of the ``name`` field in the review document matches the ``name`` field of the restaurant document. -The following is a subset of the returned results: +The following shows a subset of the returned results: .. code-block:: json // Results Truncated - { "restaurant" : { - "_id" : ObjectId("..."), - "name" : "The Movable Feast", - "restaurant_id" : "40361606", - "cuisine" : "American", - "address" : {...}, - "borough" : "Brooklyn", - "grades" : [...] }, - "reviews" : [ - { "_id" : ObjectId(...), "restaurant_name" : "The Movable Feast", "reviewer" : "Lazlo Cravensworth", "review_text" : "Great restaurant! 12/10 stars!" }, - { "_id" : ObjectId("..."), "restaurant_name" : "The Movable Feast", "reviewer" : "Michael Scarn", "review_text" : "It really was a feast" } - ] - } + { + "restaurant": { + "_id": ObjectId("..."), + "name": "The Movable Feast", + "restaurant_id": "40361606", + "cuisine": "American", + "address": { ... }, + "borough": "Brooklyn", + "grades": [ ... ] + }, + "reviews": [ + { + "_id": ObjectId("..."), + "restaurant_name": "The Movable Feast", + "reviewer": "Lazlo Cravensworth", + "review_text": "Great restaurant! 12/10 stars!" + }, + { + "_id": ObjectId("..."), + "restaurant_name": "The Movable Feast", + "reviewer": "Michael Scarn", + "review_text": "It really was a feast" + } + ] + } $vectorSearch ~~~~~~~~~~~~~