title: EF Code First CTP5, using Include method with Many to Many table
body: <p>I have something like the following many to many relationship tables.</p>
  
  <pre><code>public class Shop{
   public int Id { get; set; }
   public virtual ICollection&lt;ShopFacility&gt; ShopFacilities { get; set; }
  }
  
  public class ShopFacility
  {
   public int Id { get; set; }        
   public int ShopId { get; set; }
   public int FacilityId { get; set; }
   public virtual Shop Shop { get; set; }
   public virtual Facility Facility { get; set; }
  }
  
  public class Facility
  {
   public int Id { get; set; }        
   public virtual ICollection&lt;ShopFacility&gt; ShopFacilities { get; set; }
  }
  </code></pre>
  
  <p>and, get shops information.</p>
  
  <pre><code>using (var context = new DataContext())
  {
   return context.Shops.Include(s =&gt; s.ShopFacilities)
                       .Include("ShopFacilities.Facility")  // This line
                       .First(x =&gt; x.Id == id);
  }
  </code></pre>
  
  <p>What I want to do is call the Include method with a Lambda expression for a many to many relationship instead of string. I've tried to implement like the below code:</p>
  
  <pre><code>using (var context = new DataContext())
  {
   return context.Shops.Include(s =&gt; s.ShopFacilities)
                       .Include(s =&gt; s.ShopFacilities.Facility)  // Cannot compile
                       .First(x =&gt; x.Id == id);
  }
  </code></pre>
  
  <p>But as you guess I cannot compile it. Actually, the first code snippet works well, so basically it's okay, though, I'm kinda curious whether there is a work around or not.</p>
  
  <p>Any help would be appreciated, </p>
  
  <p>Yoo</p>