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,745
  • 2
  • 40
  • 64

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
  • 360,892
  • 59
  • 660
  • 670