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.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: