Sometimes I get an exception like this:
This method cannot be translated into a store expression.
Is there any list what EF 4.0 supports and what doesn’t?
I have just googled, but nothing ;(.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following lists the LINQ methods which are supported.
LINQ To Entities also provides the following Canonical Function Mapping for CLR type operations to SQL functions. These are the methods that should be supported, by default, by all providers. For example, String.Contains should always map to a LIKE statement in SQL, or an IndexOf statement.
However, be aware that different providers are free to do their own mapping. I have seen some EF providers which do not support the full “canonical” list of functions, or add their own. Since each EF provider does the mapping themselves, it’s impossible to give a definitive answer, other than the standard listed above.