title: Predicate Builder in MVC 3
body: <p>I have been messing with Predicate Builder for two days now and although every website says it is super easy to implement for some reason(most likely my fault) I cannot get it to work. I decided to use Predicate builder because I know which columns I would like to search and and it is all within the same table. All I am trying to do is search multiple columns for a keyword that could exist in any of the 3 columns. I have read that Predicate Builder could accomplish this easily but the tutorial's did not account for me apparently. Below is what I have so far, if anyone can point me in the right direction I would appreciate it. Right now it is not doing anything when I search, it just returns all the records. Thanks for your help!</p>
  
  <pre><code>if (!String.IsNullOrEmpty(searchString))
              {
  
  
                  var predicate = PredicateBuilder.True&lt;iamp_mapping&gt;();
  
  
  
                  predicate = predicate.Or(p =&gt; p.PA.Contains(searchString));
                  predicate = predicate.Or(p =&gt; p.MAJOR_PROGRAM.Contains(searchString));
                  predicate = predicate.Or(p =&gt; p.INVESTMENT_AREA.Contains(searchString));
  
              }
  </code></pre>