I have two tables, family_fishing (the parent table) with a key of PROGRAMNUMBER and family_fishing_reg with a key of randomnumber (seriously, I did not design these tables) and a column of programnumber which should be the foreign key.
ProgramNumber in both tables is NOT NULL. The type in both tables is the same.
When I bring them into Entity Framework and create an assocation, the association wantd the dependant key to be the randomnumber column, the entity key on the child table. (RandomNumber is a guid.)
When I double click on the association I can ONLY select randomnumber for the dependant key but this will never relate to family_fishing.PROGRAMNUMBER which is an nvarchar(6). (Yes, a key column as an nvarchar is not my choice either.)
I have to work with the tables that I have. I'm trying to plug into a database that is not managed by me. I have binged and googled all over and can't seem to understand why this is. The association is looking for a mapping, which also wants to use the randomnumber column. But this should be a typical 1 to many foreign key association.
What can I try? What can I read? Who can I ask to find an answer to this?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.