do the same as with direct SQL
you can provide special characters with a like clause such as ".", "%" and "[]"
if this is not good enough, you can use the regular expression, but be careful, as the regular expression will execute as a "client", i.e. it will extract all of this, and then try to limit the results in memory. You can optimize the zerkms method somewhat by doing
from p in Objects where p.Title.Contains("Britney") && p.Title.Contains("Spears") && regex.Match(p.Title).Success select p
I have not tested it, but it should run the first two conditions on the SQL server side, and then narrow it down with a regular expression.
Lia g
source share