-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.4
-
Component/s: None
-
None
Add support for LINQ queries like:
var query1 = from c in collection.AsQueryable<C>()
where c.A.Any(a => (a % 2) == 0 && a > 2)
select c;
This example assumes c.A is an array of ints and is looking for documents where c.A contains an even number greater than 2. It requires use of $elemMatch, but there is some concern about use of $elemMatch when the array values are not embedded documents.
In any case, full support for mapping arbitrary C# predicates on array elements requires robust $elemMatch support in the server, including support for scalar or document values as well as $and and $or.
- is duplicated by
-
CSHARP-468 Any() query on subdocument inside of Where() throws exception
- Closed
-
CSHARP-491 LINQ Feature Doesn't Support $elemMatch
- Closed
-
CSHARP-425 Linq Support For Any() extension method
- Closed
- related to
-
CSHARP-1325 Extend support for Enumerable.Any with predicate in LINQ queries
- Closed