title: LinqKit PredicateBuilder with EF 4 CPT 5 table relationships?
body: <p>I'm using LinqKit PredicateBuilder (http://www.albahari.com/nutshell/predicatebuilder.aspx) for a method that do searching. This is how the relationships are built (Entity Framework 4 CPT 5 POCO):</p>
  
  <pre><code>public class MusicSheet
  {
      [Key]
      public int ID { get; set; }
      public string Title { get; set; }
      public string Key { get; set; }
  
      public virtual ICollection&lt;Author&gt; Authors { get; set; }
  }
  
  public class Author
  {
      [Key]
      public int ID { get; set; }
      public string Name { get; set; }
      public string Bio { get; set; }
  
      public virtual ICollection&lt;MusicSheet&gt; MusicSheets { get; set; }
  }
  </code></pre>
  
  <p>I need to be able to build a predicate that checks for <code>MusicSheet</code> (the <code>Title</code> contains a specific search term) as well as the <code>Name</code> or <code>Bio</code> of the Author who might also contain that search term. Here is what I currently have:</p>
  
  <pre><code>var predicate = PredicateBuilder.False&lt;MusicSheet&gt;();
  foreach (var term in terms)
  {
      string keyword = term;
  
      predicate = predicate
      .Or(s =&gt; s.Title.Contains(keyword));
      // TODO Check for Author Name &amp; Bio
  }
  </code></pre>
  
  <p>Any suggestions? Thank you very much.</p>