title: Entity Framework DbContext Where In Query
body: <p>I am trying to query an Entity/Table and determine if a record exist that matches a list of items.</p>
  
  <p>In other words I have an array of names, I want to build my query to do something like:</p>
  
  <pre><code>string[] fileList = {"Clients", "Jobs", "People"};
  ICollection&lt;DocumentsView&gt; documentList = await _dataContext.FindAllAsync&lt;DocumentsView&gt;(fileList.Containts(a.name)));
  </code></pre>
  
  <p>The above obviously doesn't work, but is there some way to do that?
  I'm currently doing this, and it's working, but there has to be a better way...what if I wanted to extend the list of items to compare?  etc.</p>
  
  <pre><code>ICollection&lt;DocumentsView&gt; documentList = await _dataContext.FindAllAsync&lt;DocumentsView&gt;(a=&gt;a.name == "Clients" &amp;&amp; a.name == "Jobs" &amp;&amp; a.name == "People");
  </code></pre>
  
  <p>Here is my FindAllAsync method for the DbContext query:</p>
  
  <pre><code>public async Task&lt;ICollection&lt;T&gt;&gt; FindAllAsync&lt;T&gt;(Expression&lt;Func&lt;T, bool&gt;&gt; match) where T : class
  {
      return await _context.Set&lt;T&gt;().Where(match).ToListAsync();
  }
  </code></pre>