title: unidirectional many-to-many relationship with Code First Entity Framework
body: <p>I am new to EF, and trying to get many-to-many unidirectional relationship with code first approach. For example, if I have following two classes (not my real model) with  be a N * N relationship between them, but no navigation property from &quot;Customer&quot; side.</p>
  <pre><code>public class User {
     public int UserId { get; set; }
     public string Email { get; set; }
     public ICollection TaggedCustomers { get; set; }
  }
  public class Customer {
    public int CustomerId { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
  }</code></pre>
  <p>The mapping code looks like ...</p>
  <pre><code>modelBuilder.Entity()
          .HasMany(r => r.TaggedCustomers)
          .WithMany(c => c.ANavgiationPropertyWhichIDontWant)
          .Map(m =>
          {
              m.MapLeftKey("UserId");
                  m.MapRightKey("CustomerId");
                  m.ToTable("BridgeTableForCustomerAndUser");
          });</code></pre>
  <p>This syntax force me to have &quot;WithMany&quot; for &quot;Customer&quot; entity.
  The following <a href="http://msdn.microsoft.com/en-us/library/hh295843%28v=vs.103%29.aspx" rel="noreferrer">url</a>, says &quot;By convention, Code First always interprets a unidirectional relationship as one-to-many.&quot;</p>
  <p>Is it possible to override it, or should I use any other approach?</p>