EF 4.1 RC Many to many relationship in EF CF
I have two entities with many to many relationship like this: class author { public int AuthorID{get;set;} public string Name{get;set;} public virtual ICollection<book> books{get;set;} } class book { public int BookID{get;set;} public string Name{get;set;} public virtual ICollection<author> authors{get;set;} } and I have an intermediate table named Bookauthor defined like this: BookAuthor: int int AuthorID int BookID How to map this using FluentAPI Thanks!! This was problematic with EDMX but with EF 4.1 fluent API you can map it : modelBuilder.Entity<book>() .HasMany(b => b.authors) .WithMany