Linq and Canonical Function problem

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




If you run the code below, following error appear:
The 'Invoke' LINQ expression node type is not supported by LINQ to Entities.


The problem is that Entity Framework does not provide mapping of same expression like method invocation.
This post describes the CLR Method to Canonical Function Mapping in more details:
To solve this specific case shown in the example above, the solution is supply in select-command something,
what can be understood by LINQ-provider. That is, you cannot invoke the method, but you can create the
object which internally invoke the method you need.




Posted Jun 27 2008, 01:20 PM by Damir Dobric is a .Net Community Blog powered by daenet GmbH.