I have a table tblEvent and another table tblContact. There is a field ContactID in tblEvent that is linked by a foreign key to ContactID in tblContact. I've triple checked; the foreign key is in the database.
The Entity Framework model DOES NOT generate a navigation property and foreign key association for it as it does for the other foreign keys.
What could be different about this foreign key that EF does not generate a navigation property for it?
I found the solution here:
The reason it was not recognizing it is was because the table had a unique non-clustered index on the foreign key field.
Apparently, a unique, non-clustered index allows for a null value which can't be mapped.