Is there any way to compare strings in a C# LINQ expression similar to SQL\'s LIKE operator?
LIKE
Suppose I have a string list. On this list I want to search
Regex? no. But for that query you can just use:
string filter = "BALTIMORE"; (blah) .Where(row => row.PortName.Contains(filter)) (blah)
If you really want SQL LIKE, you can use System.Data.Linq.SqlClient.SqlMethods.Like(...), which LINQ-to-SQL maps to LIKE in SQL Server.