title: Lambda or Linq method to search multiple parameters
body: <p>I have a List of Of Objects and id like to query the list with multiple parameters to whittle down the results on a search page.</p>
  
  <pre><code>     int SecLink = (!string.IsNullOrEmpty(Request.QueryString["Sector"])) ? Convert.ToInt32(Request.QueryString["Sector"]) : 0;
          int LocLink = (!string.IsNullOrEmpty(Request.QueryString["Location"])) ? Convert.ToInt32(Request.QueryString["Location"]) : 0;
          int IndLink = (!string.IsNullOrEmpty(Request.QueryString["Industry"])) ? Convert.ToInt32(Request.QueryString["Industry"]) : 0;
          int VacLink = (!string.IsNullOrEmpty(Request.QueryString["Vacancy"])) ? Convert.ToInt32(Request.QueryString["Vacancy"]) : 0;
  
          string keyword = Request.QueryString["SearchTerm"];
  
          var dx = new DataX();
          var lstJobs = dx.GetAllJobs().Where(x =&gt; x.SectorLink.Equals(SecLink) &amp;&amp; x.LocationLink.Equals(LocLink) &amp;&amp; x.IndustryLink.Equals(IndLink) &amp;&amp; x.VacancyTypeLink.Equals(VacLink) &amp;&amp; x.JobName.Contains(keyword)).ToList();
  
          if (lstJobs.Count &gt; 0)
          {
              uiRptSearchJobs.DataSource = lstJobs;
              uiRptSearchJobs.DataBind();
  
              uiLitSearchResults.Text = string.Format("&lt;h4&gt;Search result found {0} matches&lt;/h4&gt;", lstJobs.Count);
          }
  </code></pre>
  
  <p>The search params may be '0' as not selected from the previous page, so the results should reflect his.</p>
  
  <p>This is the querystring im passing:</p>
  
  <p><code>Default.aspx?section=search&amp;Sector=4&amp;Location=0&amp;Industry=0&amp;Vacancy=0&amp;SearchTerm=</code></p>
  
  <p>but as you can see they querystring will change with what the user selects from the previous page.</p>