views:

30

answers:

1

I have a simple database with 2 main tables with a many to many relationship through a 3rd bridge/join table.

This 3rd table has an extra field besides the two keys required, so that Entity Framework transforms it into a full entity rather than a many to many relationship between the other 2 tables.

I cannot change this third table in the database itself. Is there a way to ignore the extra field so that EF can do what I want, or a way to manually transform the bridge table into a many to many relation?

+1  A: 

Yes, update the store schema (SSDL) to remove the additional fields and regenerate the MSL/CSDL. The easiest way to do this is to create your mapping with a DB which doesn't have these fields. It will work fine against the "real" DB at runtime.

Craig Stuntz
Not exactly what I had in mind, but it seems to work well enough.
SirDemon