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"
This item was completed a few month ago. Our apologies for not updating this item sooner.
Thank you for your suggestion and votes!
Jonas Thøger Hansen commented
Hi, Will this query be executed using index or will the query perform a scan? I would like to know the performance of querying collections.
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.