Support LINQ ANY or WHERE for child object collections
Example trying to query Sales
var querySales = DocumentDb.Client.CreateDocumentQuery<Sale>(collectionLink)
.Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Any(qq => qq.Id == userId))
Buy ANY not supported
.Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Where(qq => qq.Id == advisorUserId).Count() > 0)
get WHERE not supported
Really want the DB to perform the search as a lot of results will come back.
"Name": "test user"
We have started work on this feature and plan to release it in an upcoming release. I cannot give an exact date but this should be released soon. Will update here once a date is known or once it is publicly available.
Thank you for your suggestion.
Works fins for me in 2.2.1
Vitalii Herasymiv commented
It seems that in the latest package (2.2.1) Any() works. Could you confirm that?
Prasad Bhokare commented
Please support this feature at earliest.
Conrad Chan commented
DocumentDB already has ARRAY_CONTAINTS support in sql format. It will be great to support Any() to expose that functionality to LINQ clients.