Using database first model: Let\'s say we have the classic tables Student, Course and StudentCourse (the latter obviously having FKs t
According to this tutorial, you'll get the desired behaviour if your StudentCourse table only contains the foreign-key columns. If it contains any other columns, EF will generate an intermediate entity to represent the join.
In this case, dropping the surrogate key from the StudentCourse table and replacing it with a composite primary key should work.