1

This is the same exact question as this, but instead for EF5.

Is it possible now?

We have a Users table that has an int PK, but in our other tables that have columns like InsertBy/UpdateBy, the desire is to use value of the LANID varchar column from the Users table, rather than the UserID.

Community
  • 1
  • 1
JoeBrockhaus
  • 2,643
  • 2
  • 38
  • 63

1 Answers1

3

No it is still not possible. FK must target PK in the principal table because EF still doesn't support unique keys (prerequisite for using non-PK columns).

Ladislav Mrnka
  • 355,666
  • 57
  • 651
  • 662