title: Entity Framework and many-to-many relation with explicit link table
body: <p>I'm using code-first Entity Framework and I know you can easily create a many-to-many relation between ObjectA and ObjectB by adding an ICollection to each; EF will automatically create a link table behind the scenes.</p>
  
  <pre><code>public class ObjectA {
      public ICollection&lt;ObjectB&gt; ObjectsB { get; set; }
  }
  
  public class ObjectB {
      public ICollection&lt;ObjectA&gt; ObjectsA { get; set; }
  }
  </code></pre>
  
  <p>Now I needed an additional property to this relation, so I made my own link table</p>
  
  <pre><code>public class ObjectA {
      public ICollection&lt;ObjectA_ObjectB&gt; AtoB { get; set; }
  }
  
  public class ObjectB {
      public ICollection&lt;ObjectA_ObjectB&gt; BtoA { get; set; }
  }
  
  public class ObjectA_ObjectB {
      public ObjectA A { get; set; }
      public ObjectB B { get; set; }
  
      public DateTime MyStartDate { get; set; }
  }
  </code></pre>
  
  <p>This works fine, but the big loss is that I now no longer have a direct collection of ObjectB and ObjectA in my entities, even though the relation is still the same, just with an explicit link table.</p>
  
  <p>I really want my direct collections back. Is there some way (with ModelBuilder or data annotations?) to combine the two methods above?</p>