Although sometimes the documentation is incomplete, you should be able to find the answer to your question directly from the documentation, but you may not be looking in the right place. Select the driver version: https://api.mongodb.com/csharp/ The projection method is in the MongoCursor里面,而不是Findmethod
public virtual MongoCursor SetFields(
params string[] fields
)
Like a series of other methods, it still returns MongoCursor, so you can actually do cascading operations on it, such as
Although sometimes the documentation is incomplete, you should be able to find the answer to your question directly from the documentation, but you may not be looking in the right place.
Select the driver version:
https://api.mongodb.com/csharp/
The projection method is in the
MongoCursor
里面,而不是Find
methodLike a series of other methods, it still returns
MongoCursor
, so you can actually do cascading operations on it, such as