views:

107

answers:

2

Maybe im just an idiot, but I am having serious issues mapping relationships with the new entity framework.

When using LinqToSql, you would just right click the table, add association, select the two tables, and selected the property from each table the association was based on. End of story, it worked perfectly.

Using the entity framework and the slightly different visual editor, I go about doing the same thing, but there is no option in the initial association menu to select the actual properties. So after that, you bring up the association map, and thats where the problems start... What the hell? The only thing you can edit in here is the column to which a key is mapped, but the only columns you can choose are those in the same table as the key... Im completely lost.

A: 

Instead of mapping the association in the designer, try setting up your foreign key constraints on your tables then update the model from the database and the associations will be setup for you.

DaveB
A: 

There is no possibility to map association end to an incomplete Entity Key.
This is an Entity Framework limitation.

Devart