title: Dynamic Linq Contains to filter a List
body: <p>I have this Method</p>
  
  <pre><code>public static IEnumerable&lt;T&gt; Filter&lt;T&gt;(IEnumerable&lt;T&gt; source, string searchStr)
  {
      var propsToCheck = typeof(T).GetProperties().Where(a =&gt; a.PropertyType == typeof(string));
  
      var filter = propsToCheck.Aggregate(string.Empty, (s, p) =&gt; (s == string.Empty ? string.Empty : string.Format("{0} OR ", s)) + string.Format("{0} == @0", p.Name).ToLower());
  
      var filtered = source.AsQueryable().Where(filter, searchStr);
      return filtered;
  }
  </code></pre>
  
  <p>Which takes List and a search string and finds any matches in the list. However this only works for 100% matches, how can I make this case insensitive and use contains instead of a 100% match ?</p>