I have read this question and i understand that.
Let's say i have tow entities and they have One to Zero or One relatinship. Let's say I have such code:
myFirstEntity.PrimaryKey = 5;
myContext.Entry(myFirstEntity).State = System.Data.EntityState.Unchanged;
After the second line, myFirstEntity.MySecondEntity.PrimaryKey
value will also be 5.
So, it is OK.
But, it is not wokring if make changes reversely:
mySecondEntity.PrimaryKey = 5;
myContext.Entry(mySecondEntity).State = System.Data.EntityState.Unchanged;
After the second line, mySecondEntity.MyFirstEntity.Pk
value is still 0.