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

Remove IMongoQueryable interface

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: 2.28.0
    • Component/s: LINQ3
    • None
    • Minor Change
    • Dotnet Drivers
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

       

      We need to document that this interface has been removed and that applications should use the standard IQueryable interface instead.

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?   We need to document that this interface has been removed and that applications should use the standard IQueryable interface instead.

      We have a custom interface called `IMongoQueryable` that derives from `IQueryable`.

      The intent of this interface is to limit applicability of our custom extension methods to `IQueryable` instances known to be LINQ queries against MongoDB.

      Most LINQ providers don't do this. They just define their custom extension methods against `IQueryable` and limit the visibility of them by putting them in a separate namespace.

      So for example, if we defined our custom extension methods against `IQueryable` they would only be visible when adding a `using MongoDB.Driver.Linq` statement.

      Supporting `IMongoQueryable` as a separate interface from `IQueryable` reequires some awkwardness (see `MongoQueryable.cs` in particular). Things would be a lot simpler if we just stuck to `IQueryable` like other LINQ providers.

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

              Created:
              Updated:
              Resolved: