Entity framework Code First One-to-One relationship
I have two entities which I want to be connected 1:1 relationship. User is principal and UserActivation is dependent, but I have no idea how that works. public class User { [Key] public Guid Id { get; set; } public string Name { get; set; } public string Lastname { get; set; } public string Username { get; set; } public virtual UserActivation UserActivation { get; set; } } public class UserActivation { [Key] public Guid Id { get; set; } public Guid UserId { get; set; } public bool Active { get; set; } public virtual User User { get; set; } } I have tried to remove 'virtual' keyword, have tried