2. Using SqlMethods.Like method
Digging into System.Data.Linq.SqlClient namespace, I found a little helper class called SqlMethods, which can be very usefull in such scenarios. SqlMethods has a method called Like, that can be used in a Linq to SQL query:

var query = from c in ctx.Customers

where SqlMethods.Like(c.City, “L_n%”)

select c;

This method gets the string expression to check (the customer’s city in this example) and the patterns to test against which is provided in the same way you’d write a LIKE clause in SQL.

Using the above query generated the required SQL statement:

SELECT CustomerID, CompanyName, …
FROM dbo.Customers
WHERE City LIKE [L_n%]