Entity Framework 4.1 Code First approach to create many-to-many relation
问题 I'm using the Silverlight 5 Beta SDK and the EntityFramework 4.1 in an Silverlight Application. I'll try to create the two tables 'Author' and 'Book'. In SQL, there should be a third (join) table, which makes the many-to-many relation between Author and Book (one author could have written many books and a book could be written from many authors). This is what I've got so far: namespace CodeFirst.Models.Web { public class Author { public Author() { this.Books = new HashSet<Book>(); }