Description
This unit test works when you declare the type as int[], but not when you declare the type as IList<int>.
I believe this also affects LINQ expressions using Contains or In. IEnumerable, array types, and List types are supported but IList throws an Unsupported exception.
[Test]
|
public void TestInExpressionWithIList()
|
{
|
IList<int> list = new[] { 2, 4, 6 };
|
var query = Query<A>.Where(a => list.Contains(a.X));
|
var expected = "{ \"x\" : { \"$in\" : [2, 4, 6] } }";
|
Assert.AreEqual(expected, query.ToJson());
|
}
|
Attachments
Issue Links
- is duplicated by
-
CSHARP-785 Custom/unsupported collections with their own impl of .Contains(...) causes a LINQ error
-
- Closed
-