-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Something along the lines of this:
await collection.Find(x => x.Name) .Project<BsonDocument>() .ToListAsync();
By not including any projection at all, we can change our result type. This is a power user feature for those who know what they are doing. In addition, it might be possible for us to, based on the IBsonDocumentSerializer, to generate an inclusive list of all the mapped fields automically.
This is almost necessary for users including the $explain modifier in the FindOptions.Modifers property.
- duplicates
-
CSHARP-1323 Need an easier way to change the result type of a query without using Project.
- Closed