LINQ and EF with string .StartWith (char c)
I have a problem with the search engine we once see on the site. I have a long list of people. List filtering method: "#, A, B, C, D, E, [...]".
The problem I have is when I execute a query with EF an error is thrown. Here is my code.
Code:
var query = from p in m_context.Persons
where char.IsDigit(p.Name, 0)
select a;
The error says that it is not possible to convert it to a valid expression in the database. So, do it anyway?
Thanks guy.
UPDATE =======================
Here is my mistake.
LINQ to Entities does not recognize the method "Boolean Contains [Char] (System.Collections.Generic.IEnumerable1) [System.Char], Char)", and this method cannot be translated to store expression.
+2
source to share