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

LINQ3: Replace multiple copies of GetMongoQueryProvider with a single GetCollectionInfo extension method

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 2.14.0
    • None
    • LINQ3
    • None

    Description

      There is more than one place where we have a helper method called GetMongoQueryProvider which is used to find the MongoQueryProvider from the inner parameter to one of the Join methods.

      Replace it with a single extension method GetCollectionInfo that returns two values like:

      var (innerCollectionName, innerSerializer) = innerExpression.GetCollectionInfo(containerExpression: expression);

      The reason for the name change and the return value changes is that we don't actually care about the query provider, the query provider is just an intermediate step in getting the underlying inner collection and serializer info.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: