public class Departments { [Key] public int DepartmentId{get;set}; public string Name {get;set;} public int BossId {get;set;} [ForeignKey("BossId")] public Employees Boss{get;set} public Icollection<Employees> Employees{get;set;} }
public class Employees { [Key] public int EmployeesId{get;set}; public string Name {get;set;} public int DepartmentId{get;set}; [ForeignKey("DepartmentId")] public Departments Department {get;set;} }
Unable to determine the relationship represented by navigation property 'Departament.Boss' of type 'Worker'. Either manually configure the relationship