DocumentDB IN keyword with Linq

You can now create IN queries with DocumentDB like this:

SELECT *
FROM Families 
WHERE Families.id IN ('AndersenFamily', 'WakefieldFamily')

But if I run a similar query with Linq I get an error {"Method 'Contains' is not supported."}

.where(a => familyNames.Contains(a.Families))

How can I crate IN queries with Linq?

Upvotes: 5

Views: 932

Answers (2)

Mohamed
Mohamed

Reputation: 31

This is fixed now, what you have should work with the new SDK releases.

Upvotes: 2

Andrew Liu
Andrew Liu

Reputation: 8119

IN is not currently supported by the LINQ provider.

We will fix this in a future SDK update.

Upvotes: 1

Related Questions