LIKE query with Entity Framework

Viewed 97958

Possible Duplicate:
How to do SQL Like % in Linq?
Like Operator in Entity Framework?

I'm doing a query like this:

    var matches = from m in db.Customers
        where m.Name == key
        select m;

But I don't need m.Name to be exactly equal to key. I need m.Name to be like key.

I can't find how to recreate the SQL query:

    WHERE m.Name LIKE key

I'm using SQL Server 2008 R2.

How to do it?

Thanks.

2 Answers
Related