title: EntityFramework many-to-many with junction table
body: <p>I have two tables, in a many-to-many relationship, with a junction table, as follows:</p>
  
  <pre><code>Member       MemberGroup        Group
  =========    ============       =======
  PK | ID      PK | ID            PK | ID
     | Name       | Member           | Name
                  | Group
                  | MemberSince
  </code></pre>
  
  <p>I need to add all the members of a specific group to a list box.  The group is selected from a data bound combo box.  I was looking to do something like this:</p>
  
  <pre><code>listbox1.ItemsSource = DataModel.Members.Where(u=&gt;u.Group == mygroup);
  </code></pre>
  
  <p>However, the Member entity only contains the MemberGroup entries.... not the actual groups.</p>
  
  <p>What is the best way to do this?</p>
  
  <p>By the way, .NET Framework 3.5, WPF, Entity Framework, C#, SQL Server Compact Edition (2008)</p>