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

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.14.0
    • Affects Version/s: None
    • Component/s: LINQ3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: