title: Direct Navigation Property in Entity Framework 6
body: <p>I want to achieve the following:</p>
  
  <pre><code>public class A
  {
      public int ID { get; set; }
      public string Name { get; set; }
  
      public virtual ICollection&lt;B&gt; Bs { get; set; }
  }
  
  public class B
  {
      public int ID { get; set; }
      public string Name { get; set; }
  
      public virtual ICollection&lt;A&gt; As { get; set; }
  }
  
  public class C
  {
      public int AID { get; set; }
      public int BID { get; set; }
      public string OtherProperty { get; set; }
  }
  </code></pre>
  
  <p>A and B are many many, joined by C. However, C also has some of it's own properties, which is why I need to represent it.</p>
  
  <p><strong>I want to go from A directly to Bs without having to go through C first. (and from B to As)</strong></p>
  
  <p>This would be easy if C simply joined A and B without extra properties. But because C has extra properties and I need to represent it, I get the following error.</p>
  
  <blockquote>
    <p>Cannot automatically bind the navigation property 'Bs' on entity type 'A' for the entity set or singleton 'A' because there are two or more matching target entity sets or singletons. The matching entity sets or singletons are: B, Bs.</p>
  </blockquote>
  
  <p>Here is my mapping of it helps ...</p>
  
  <pre><code>modelBuilder.Entity&lt;A&gt;()
                  .HasMany&lt;B&gt;(x =&gt; x.Bs)
                  .WithMany(x =&gt; x.As)
                  .Map(x =&gt;
                      {
                          x.MapLeftKey("a_id");
                          x.MapRightKey("b_id");
                          x.ToTable("c");
                      });
  </code></pre>