Is there a way to get ADO.NET Entity to generate 1:1 navigation properties? If I do foreign keys I always get 1:N navigation properties.
A:
Yes - it's possible. I don't know what to do in the Designer, but try to change the Multiplicity somewer. Sorry! Seldom used the Desinger - working more with code generation.
Arthur
2010-01-29 18:24:42
Multiplicity settings are grayed out for me.
jameszhao00
2010-01-29 18:57:40
A:
If I have a foreign key constraint in the database for EntityA like this: FOREIGN KEY (FIELD_X) REFERENCES ENTITYB (FIELD_Y), then when you generated the edmx you should get a single-instance navigational property on EntityA (e.g.: EntityA.EntityB).
FOR
2010-01-29 18:29:42
Thing is I want single instance navigation properties on both Entity A and B :)
jameszhao00
2010-01-29 18:31:34
hmm I haven't tried it, but applying the FK from A to B and an FK from B to A may just do the trick?
FOR
2010-01-29 19:07:55