title: LINQ Query with Array input and variable Where Statements - Advice
body: <p>I would like to query data given an array to filter by via WCF Data Services using the Silverlight Client API.  Basically, I want to query Employees given a list (array) of States.  </p>
  
  <p>I'm thinking something like this:</p>
  
  <pre><code>public IQueryable&lt;Employee&gt; Load(string[] states)
  {
       foreach (var x in states)
       {
             // LINQ query here with 1 to N .Where statements
             return from e in Context.Employees
             .Where(...)
       }
  } 
  </code></pre>
  
  <p>So let's say my array has 2 items in it, i.e. I want to query by 2 states, I would do something like this manually:</p>
  
  <pre><code>return from e in Context.Employees
      .Where(e =&gt; e.State== states[0] || e.State == states[1])));
  </code></pre>
  
  <p>Any advice will be greatly appreciated!</p>