Having serious problems with Entity Framework & Foreign Keys :(?

In EF (3.5 and 4.0) FKs MUST point to Primary Keys But you appear to be attempting to point to a Candidate Key (i.e. Countries. CountryId I know that this is something the EF team are considering for the next version though :) Hope this helps Alex.

In EF (3.5 and 4.0) FKs MUST point to Primary Keys. But you appear to be attempting to point to a Candidate Key (i.e. Countries.

CountryId I know that this is something the EF team are considering for the next version though :) Hope this helps Alex.

Thank you kindly Alex for picking up on my question. I sincerly appreciate it :) Looks like i'll go back to making the identities the PK's and adding unique constraints. Doh :) always one step ahead of the current EF builds... :) Thanks again mate - really love your help :) keep it up!

– Pure. Krome Sep 15 '10 at 6:54 1 I looked at the CTP5 change docs and didn't see anything related to this. Is this feature still being considered, or in the pipeline, or...? This is a real stumbling block for mapping legacy databases.

– Jon Seigel Mar 7 at 20:39.

Now, the Foreign Key for States is a CountryId. Pretty simple stuff. BUT EntityFramework doesn't like it :( It's assuming that I need to connect some properties from State entity to both primary key properties in the Country entity.

Is it possible to add an ASSOCIATION between Country and State on Country. CountryId State.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions