When I was using Entity framework code first, I encountered an error when I tried to create an entity into database. The entity is: [ Table (" EmployeeProfile ")] public partial class EmployeeProfile { [ Key ] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public int EmployeeProfileID { get; set; } [ ForeignKey ("Employee")] public int EmployeeID { get; set; } public virtual Employee Employee { get; set; } [ ForeignKey (" Profile ")] public int ProfileID { get; set; } public virtual Profile Profile { get; set; } ...