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

Support joins in Linq

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.2
    • Component/s: None

      I would like to have joins supported, to join multiple collections. For instance:

          var matches = (from driver in driverCollection.AsQueryable()
                         join car in carCollection.AsQueryable() on driver.CarId equals car.Id
                         where driver.Name == "Tim Kellogg"
                         select new { DriverName = driver.Name, CarNumber = car.Number }).ToArray();
      

      I would assume that the initial naive algorithm would be

      1. Get all drivers that match the WHERE clause
      2. Get all cars that satisfy the ON clause (and the WHERE, if it applies)
      3. Do the SELECT clause

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            tkellogg Tim Kellogg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: