SyntaxFix
Write A Post
Hire A Developer
Questions
You must make your foreign key nullable:
public class User { public int Id { get; set; } public int? CountryId { get; set; } public virtual Country Country { get; set; } }