title: The LINQ expression could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation
body: <p>I have C# application (.NET Core 3.1) and I have written the following LINQ expression.</p>
  <pre><code>public ActionResult&lt;bool&gt; GetItems(string title)
  {
       var items = _service.All.GetItems().OrderByDescending(o =&gt; o.Id).Where(w =&gt; w.Portal_Id == 1);
  
       if (!string.IsNullOrWhiteSpace(title))
       {
              var terms = title.Split(' ').ToList();
              items = items.Where(w =&gt; terms.Any(a =&gt; w.ItemName.Contains(a)));
       }
       // Some Other code
       return Ok();
  }
  </code></pre>
  <p>whenever this expression is executed i get the following error</p>
  <pre><code>The LINQ expression 'DbSet&lt;PosItem&gt;\r\n    .Where(p =&gt; !(p.IsDeleted))\r\n    
  .OrderByDescending(p =&gt; p.CreatedAt)\r\n    .Where(p =&gt; p.Portal_Id == 1)\r\n    .Where(p =&gt; __terms_1\r\n      
  .Any(a =&gt; p.ItemName.Contains(a)))' 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 https://go.microsoft.com/fwlink/?linkid=2101038 for more information.&quot; 
  </code></pre>
  <p>I cannot add ToList() and switch to client evaluation because the data set is too big to do so.</p>
  <p>Please advise how can I resolve this issue without switching to client evaluation.</p>
  <p>Thanks</p>