I use EF 4.1 RC and CodeFirst / POCO to create my code database.
Imagine that you have a many-to-many relationship, such as Teacher-Pupils (one teacher can have many students, and one student can have many teachers). Accordingly, I have two POCOs: (1) Teacher and (2) Student.
When the EF creates the appropriate tables, you will get three tables: (1) Teachers, (2) Students, and (3) an additional join table. The connection table contains exactly two fields: Teacher_ID and Student_ID.
I was wondering if I have the opportunity to add an additional field to the connection table, for example. "Class" (the class a teacher gives to a particular teacher)?
I currently have no idea how to achieve this with just two POCOs.
So, I think that all I can do is create a third POCO (for the connection table) manually, right? This will certainly work, but then I lose nice navigational properties like oneTeacher.Students.First (), etc. This is the main reason I'm still looking for another way.
source share