Reputation: 21538
I created an Entity Data Model automatically from my database. There are 3 tables (A
, B
, C
), and 2 foreign keys (A 1-* B
and B 1-* C
). The model that was created has all three tables, but only the second relation (called here an association
). I am new to Entity framework and am just trying to follow a tutorial. What can be causing this?
Upvotes: 0
Views: 116
Reputation: 19476
This may also happen if you have your Primary keys set up in your related tables. I created an edm with entity framework version 6 in VS 2013 against SQL Server 2008 R2. The relationships were set up in the database but were not showing up in the EDM for a couple tables. Once I set the Primary key fields as Primary Keys in SQL Server, the EDM updated correctly.
Upvotes: 0
Reputation: 18188
So the answer was to double check the data structure truly was as you thought. Once you had the correct data structure the model created as you expected.
Upvotes: 1