I have this:
query = query.Where(s => s.ShowTypeDescription == showTypeDescription);
query = query.Where(s => s.ShowTypeDescription **LIKE** showTypeDescription);
If all you want is to find a substring within another string, the best way to do this is with the
query = query.Where(s => s.ShowTypeDescription.Contains(showTypeDescription));
String.Contains method translates to:
CHARINDEX(ShowTypeDescription, @showTypeDescription) > 0
Which is roughly equivalent to:
ShowTypeDescription LIKE '%' + @showTypeDescription + '%'
Update: In Linq-to-SQL, you can use the
query = query.Where(s => SqlMethods.Like(s.ShowTypeDescription, showTypeDescription));
This will directly translate to the SQL
LIKE operator. Note, however, this won't work outside of Linq-to-SQL queries. Trying to call this method in other contexts will throw an exception.