title: How to configure many to many relationship using entity framework fluent API
body: <p>I'm trying to set up a many to many relationship in EF code first but the default conventions is getting it wrong.  The following classes describes the relationship:</p>
  
  <pre><code>class Product
  {
      public int Id { get; set; }
      public string Name { get; set; }
  }
  
  class Account
  {        
      public int Id { get; set; }
      public string Name { get; set; }
      public virtual ICollection&lt;Product&gt; Products { get; set; }
  }
  </code></pre>
  
  <p><strong>One Account can have many Products.</strong></p>
  
  <p>However the EF conventions will create the DB tables as:</p>
  
  <pre><code>Products Table
  --------------
  Id
  Name
  Account_Id  &lt;- What is this?
  
  Accounts Table
  --------------
  Id
  Name
  </code></pre>
  
  <p>This doesn't look like a many-to-many table structure?  How can i get configure the fluent API to reflect the relationship and create an intermediary table:</p>
  
  <pre><code>AccountProducts Table
  ---------------------
  Account_Id
  Product_Id
  </code></pre>