title: LINQ: Checking if a field (db) contains items in an ILIST?
body: <p>I am trying to create an extension method that i can forward a IList of statuses and check weather they exist, I thought the best way to do this was an ILIST - but maybe i wrong? Is this the best way to pass multple items to a method - A List? Its a generic LIST so hence no conversion etc from Object.</p>
  
  <p>Basically I have this as a signature.</p>
  
  <pre><code>    public static IQueryable&lt;Building&gt; WithStatus(this IQueryable&lt;Building&gt; qry,
            IList&lt;BuildingStatuses&gt; buildingStatus)
      {
  
          //PSUEDO CODE 
          //return from v in qry
          //       where v.Status is IN MY LIST called buildingStatus
          //       select v;
      }
  </code></pre>
  
  <p>and to call it i use (example below is in my TDD), it works great the values arrive in my method above.</p>
  
  <pre><code>    target.GetBuildings().WithStatus(new List&lt;BuildingFilters.BuildingStatuses&gt;() 
             { BuildingFilters.BuildingStatuses.Available,
               BuildingFilters.BuildingStatuses.Decommissioned });
  </code></pre>
  
  <p>so basically i have my list (IList) it arrives in the extension method with 2 values which is great but need to say in LINQ i need to say</p>
  
  <pre><code>        return from v in qry
                 where v.Status is IN MY LIST called buildingStatus
                 select v;
  </code></pre>
  
  <p>Really appreciate any help,</p>
  
  <p>with regards to my extension method, it works as i have done similar 1 but only passing type BuildingStatus hence only 1...</p>