Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 18, 2012 05:07 PM by tdykstra
Feb 18, 2012 12:05 PM|LINK
I have two entity that they have a many-to-many association. In use Model First. In sql Database, a separate table is created for many-to-many association composed by two table primary key. I want to add some fields to this table in EF. How can I do this?
Feb 18, 2012 05:07 PM|LINK
Create a new table that has the fields you want to add plus a PK for the new table and a foreign key to each of the other tables. This will create a one-to-many relationship between each of the existing tables and the new one, which is effectively the same
as a many-to-many between the existing ones. For an example of that see the Enrollment table in this tutorial: