Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1259

Need a way to change the result type of an IFindFluent or an IAggregateFluent without performing a projection.

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: