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

Support array.Contains(value) == false in LINQ queries

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5
    • Component/s: Linq

      There is no way to do a contains with the Mongo LINQ driver. This makes it very hard to do queries like the below:

      
      var list = (from p in collection.AsQueryable<MyBaseData>()
                      where p.Id != null &&
                                 ignoredIds.Contains(p.Id) == false &&
                                 p.Reference != "Baked Goods"    
                      select p).ToList();
      
      

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

              Created:
              Updated:
              Resolved: