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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With