title: LIKE query with Entity Framework
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/835790/how-to-do-sql-like-in-linq">How to do SQL Like % in Linq?</a><br>
    <a href="https://stackoverflow.com/questions/1033007/like-operator-in-entity-framework">Like Operator in Entity Framework?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm doing a query like this:</p>
  
  <pre><code>    var matches = from m in db.Customers
          where m.Name == key
          select m;
  </code></pre>
  
  <p>But I don't need <code>m.Name</code> to be exactly equal to key. I need <code>m.Name</code> to be like key.</p>
  
  <p>I can't find how to recreate the SQL query:</p>
  
  <pre><code>    WHERE m.Name LIKE key
  </code></pre>
  
  <p>I'm using SQL Server 2008 R2.</p>
  
  <p>How to do it?</p>
  
  <p>Thanks.</p>