The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities. but is supported by linq-to-sql

entity-framework linq-to-entities linq-to-sql

Question

I'm getting the problem because a project recently moved from linq-to-sql to linq-to-entities.

The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.

within this line:

var a = db.Table.Single(d => d.Date == dates[0]);

(In this particular instance, fixing it is simple, as in

var firstDate = dates[0];
var a = db.Table.Single(d => d.Date == firstDate);

)

But why does linq-to-sql work when linq-to-entities does not? Compared to linq-to-sql, did they make linq-to-entities worse? What am I overlooking?

1
5
3/18/2013 6:46:52 PM

Accepted Answer

ZZZ_tmp
4
7/31/2013 7:48:53 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow