Problem with LINQ to Entities and String.StartsWith

I would guess that EF doesn’t support the overload of StartsWith that takes a StringComparison parameter.

It should support StartsWith, EndsWith and Contains, so maybe you can try:

dp.LastName.StartsWith(searchTerm)

or:

dp.LastName.ToLower().StartsWith(searchTerm)

and then make sure that searchTerm is also lowercase.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)