title: The LINQ expression could not be translated in EF Core 3.1
body: <p>I am trying to use EF Core 3.1 to return rows that contain the specified phrase in any column. I am getting the exception: </p>
  
  <blockquote>
    <p>InvalidOperationException: The LINQ expression 'DbSet<br>
    .Where(b => __stringProperties_0   .Any(y => __Functions_1   .Like(<br>
    _: y.GetValue(   obj: b,   index: null).ToString(),   matchExpression: __p_2)))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by
    inserting a call to either AsEnumerable(), AsAsyncEnumerable(),
    ToList(), or ToListAsync(). See
    <a href="https://go.microsoft.com/fwlink/?linkid=2101038" rel="nofollow noreferrer">https://go.microsoft.com/fwlink/?linkid=2101038</a> for more information.</p>
  </blockquote>
  
  <p>How can I rewrite this query to avoid this exception?</p>
  
  <pre><code>public async Task&lt;List&lt;Table&gt;&gt;
          GetDataAsync(string query)
      {
          var stringProperties = typeof(Table).GetProperties().Where(prop =&gt; prop.PropertyType == query.GetType());
          return await _context.Table
               .Where(x =&gt; stringProperties
                  .Any(y =&gt; (EF.Functions.Like(y.GetValue(x, null).ToString(), "%" + query + "%"))))
               .AsNoTracking().ToListAsync();
      }
  </code></pre>