I\'m trying to do a one-to-one relationship, with the navigation property just on one side (MVC4, EF5, code first).
public class User { public int UserId { ge
1:1 code first in EF requires the dependent table to have the SAME primary key. Otherwise what you want to do will work.
EDIT Similar SO post Code First and Fluent API one to one relationship
Here is the MS EF site sample. http://msdn.microsoft.com/en-us/data/jj591620#RequiredToRequired