This project has moved and is read-only. For the latest updates, please go here.
4

Closed

EF 4 Designer Doesn't Show Chinook 1.3 MSSQL Relations

description

Not sure whether this is a Chinook issue or Entity Framework issue...

I got Chinook 1.3 from the releases, installed the MSSQL one on MSSQL 2008 Express, created a new .NET 4 project, Added Entity Framework 4 EDMX item, chose to generate from database and pointed to the previously mentioned DB.
It got all tables correct, but not any of the relations.

I tried enforcing some relations and / or setting update/delete to Cascade instead of None and deleting the corresponding tables (both ends) and re-adding them to model. No relations showed still.

The relations are in the DB and I can see and modify them as above and even can see them clearly in SQL Server diagram, but not in EF Designer (nor of course generated classes).

Any idea what could be the trick? (Sorry if EF-only question - Just wanted to see if you are aware of the issue, since it felt pretty straight forward exercise).
Closed Dec 3, 2012 at 5:31 PM by lerocha
This issue has been fixed and available in the 1.4 release.

comments

dozer wrote Jun 20, 2011 at 7:57 PM

Hi, there was a question about this on the EF forum at Microsoft today, and I investigated it.

The problem is the creation of the unike IPK indexes. Not sure why they corrupts it, but they isn't neccessary since the primary key constraint itself is unique, so you can remove those from the SQL script.