title: Entity Framework Core where clause with multiple values
body: <p>I have a table Person with few fields is it. I would like to find multiple people from the DB in one call without putting lots of 'OR's. When I tried the following query I got this error.</p>
  <pre><code>var list = new List&lt;string&gt;(){&quot;John&quot;, &quot;Adam&quot;, &quot;Bill&quot;, &quot;David&quot;};
  context.People.Where(p=&gt;list.Any(l=&gt;l == p.Name)).ToList();
  </code></pre>
  <p>error message:</p>
  <blockquote>
  <p>System.InvalidOperationException: 'The LINQ expression 'DbSet
  .Where(p =&gt; __list_0
  .Any(l =&gt; l == p.Name))' 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="noreferrer">https://go.microsoft.com/fwlink/?linkid=2101038</a> for more information.'</p>
  </blockquote>
  <p>I guess my query cannot be translated, but is there any other way of doing it?</p>
  <p>Thanks in advance!</p>