EF 5.0 Code First Two way navigation withought foreign key id in child
I have following classes
In the Database context I have set the relation as
After executing some actions, database gets created with Employee table having
Now when I fetch employer data, I am getting employee details with it.
How do I set the bi-directional relationship in this context?
You need to update your fluent so your relationship mapping contains both ends: