Reputation: 16155
Is it possible for Entity Framework 4.0 to have an association/navigation property based off of a foreign key to a non-primary key field (it has a unique constraint).
Upvotes: 13
Views: 5223
Reputation: 364409
No because EF don't understand unique constraint yet and relations in EF must follow same rules as relations in database. Without unique principal relation cannot exist and the only way to get unique principal in EF is using primary key.
Upvotes: 9