June 06, 2011

Primary side of the relationship error on Entity Framework

Error:
The relationship 'RELATIONSHIP NAME' has columns that are not part of the key of the table on the primary side of the relationship. The relationship was excluded.

Solution:
Attention to the RELATIONSHIP NAME in your database. The Relationship Name must have a unique name and this error comes from a duplicate relationship name in database. Entity Framework (EF 4.0) generator have problem with duplicate relationship names from databases.

No comments: