When I examine the sql query the linq spits out, I noticed that it places a ESCAPE N\'~\' when doing a LIKE command. How do I get rid of this? It seems like the query take
If you use LINQ 2 Entities, use SqlQuery to remove the "~" character.
Just append the value to compare like an ordinary sql query.
For example:
var resultList = context.TableName.SqlQuery( "SELECT * FROM TableName WHERE field LIKE '%" + fieldValue+ "%' ").ToList();