Entity Framework One-To-One Mapping Issues

For one-to-one relationships, EF expects that the tables are using the same primary key. And really, if it’s a true one-to-one they probably should. So in your example, if you make UserID the primary key on the UserProfiles table, your one-to-one will work.

Leave a Comment