Reputation: 2142
I am using db-first to creating object model for a readonly database, but some relationships are not automatically picked up. For example in Foo.BarId is not automatically connected to Bar object. If I click on BarId property, I don't see anything to associate it to a Bar in the context menu or properties window. How can I manually claim foreign keys without messing up anything?
Upvotes: 1
Views: 2308
Reputation: 2142
Figured out myself... here are the steps:
(On model designer)
Done.
Upvotes: 2
Reputation: 2079
Make sure that both tables have primary keys and Bar table has foreign key defined.
Upvotes: 0