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.

    XMLWordPrintable

    Details

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

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              craiggwilson Craig Wilson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: