I am currently working with a database that pulls information from another system into it for manipulation. I decided to use Entity Framework and the DB first approach to comprise my data access. One of the unique things about the project is that I am using the buisness key from the external system as the key that will show up in associated tables but it isn't the primary key in my system. I use this key for the relationships in the associated tables EG MyTable.ExternalId --> Review.ExternalId (ExternalId IS NOT the pk in parent table). Because of this, EF doesn't recongize the relationship even though I have a foreign key constraint on the child table making this relationship known in the database.
Is there a way to override EF to tell it to use the ExternalId instead of the PK to build the relationship? Or would it be suggested that I just change the relationship to use the PK of the parent table?