daveywc
daveywc

Reputation: 3146

Entity Framework - Association Set

I am converting a project from another ORM to Entity Framework. I have a table where all 3 fields are foreign keys. So this table has been automatically mapped as an Association Set. In the previous ORM I could still work with this table as an entity - writing linq statements against it, adding and deleting objects etc. Is it possible to do this in Entity Framework with a table that has been mapped as an Association Set? I think that in the other ORM I had an option when mapping to treat the table as an entity rather than just as a collection.

Upvotes: 1

Views: 1302

Answers (1)

Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65391

In Entity framework you do not access the connection tables directly.

You relate objects to each other, and the framework adds or removes the relevant rows in the connection tables.

It can be confusing at first, but once you get used to it, it simplifies your code.

Upvotes: 2

Related Questions