DOCSP-46188 Add Lookup() method to LINQ docs#522
Conversation
✅ Deploy Preview for docs-csharp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
shuangela
left a comment
There was a problem hiding this comment.
lgtm, a few questions and nits
|
|
||
| .. code-block:: csharp | ||
|
|
||
| var lookupResult = _restaurantsCollection.AsQueryable() |
There was a problem hiding this comment.
Q: Why does this code sample use _restaurantsCollection and _reviewCollection as the name of the collections while the previous one uses the name without _? Is there a specific reason?
There was a problem hiding this comment.
Good catch, that was just how I had my variables for testing and I forgot to remove the _ in this case
| GroupJoin() | ||
| +++++++++++ | ||
|
|
||
| You can perform a ``$lookup`` stage by using the LINQ ``GroupJoin()`` method. To |
There was a problem hiding this comment.
| You can perform a ``$lookup`` stage by using the LINQ ``GroupJoin()`` method. To | |
| You can specify a ``$lookup`` stage by using the LINQ ``GroupJoin()`` method. To |
| restaurant => restaurant.Name, | ||
| review => review.RestaurantName); | ||
|
|
||
| The preceding example returns a list of ``LookupResult`` objects that |
There was a problem hiding this comment.
Q: Do we want to add a output here?
There was a problem hiding this comment.
Outputting the result here just returns an object that I couldn't iterate through without making the code a fair bit more complex, so I opted to just clarify that it returns the LookupResult object. Not ideal but the only other way I could think of showing it was with debugger output but that wouldn't go with our normal style/the flow of the page.
(cherry picked from commit b69bfd8)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-46188
Staging Links
Self-Review Checklist