title: LINQ expression is not being translated to SQL
body: <p>I'm trying to achieve a compiled SQL query from LINQ which will check if <code>query</code> is substring of any of three columns in database (case insensitive).</p>
  
  <p><strong>I'm using .NET Core 1.1</strong></p>
  
  <p>Query that I come up with is as follows:</p>
  
  <pre><code>users.Select(u =&gt; new
    {
      User = u,
      query = u.FirstName.ToLower() + u.LastName.ToLower() + u.Email.ToLower()
    }).Where(x =&gt; x.query.Contains(query))
  </code></pre>
  
  <p>But when looking at debug informations I am getting this warning:</p>
  
  <blockquote>
    <p>The LINQ expression '(([u].FirstName.ToLower() + [u].LastName.ToLower()) + [u].Email.ToLower()).Contains(__query_0)' could not be translated and will be evaluated locally.</p>
  </blockquote>
  
  <p>Second query that I tried:</p>
  
  <pre><code> users.Where(x =&gt; u.FirstName.ToLower().Contains(query) || u.LastName.ToLower().Contains(query) || u.Email.ToLower().Contains(query))
  </code></pre>
  
  <p>but it gives me exactly the same warning.</p>
  
  <p>Why is is the case?
  I am looking for something like:</p>
  
  <pre><code>SELECT * FROM USERS WHERE FirstName LIKE query OR LastName LIKE query OR Email LIKE query
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I did one more experiment :</p>
  
  <pre><code>    users.Where(u =&gt;
      u.FirstName.Contains(query) ||
      u.LastName.Contains(query) ||
      u.Email.Contains(query));
  </code></pre>
  
  <p>And this also resulted in </p>
  
  <blockquote>
    <p>The LINQ expression '(([u].FirstName.Contains(__query_0) OrElse [u].LastName.Contains(__query_1)) OrElse
    [u].Email.Contains(__query_2))' could not be translated and will be
    evaluated locally. </p>
  </blockquote>