[CSHARP-1259] Need a way to change the result type of an IFindFluent or an IAggregateFluent without performing a projection. Created: 27/Apr/15  Updated: 10/Aug/15  Resolved: 10/Aug/15

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Craig Wilson Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CSHARP-1323 Need an easier way to change the resu... Closed

 Description   

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.


Generated at Wed Feb 07 21:39:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.