我正在尝试使用Entity Framework Core构建电话列表。每当我尝试运行命令:Add-Migration "Initial"
我会收到以下错误信息:无法确定类型为'Team'的导航属性'Member.MemberTeam'所表示的关系。请手动配置该关系,或从模型中忽略此属性。
以下是我的模型:
public class Member {
public int Id { get; set; }
public string MemberName { get; set; }
public string MemberTitle { get; set; }
public Member MemberSupervisor { get; set; }
public Team MemberTeam { get; set; }
}
public class Team {
public int Id { get; set; }
public string TeamName { get; set; }
public Member TeamSupervisor { get; set; }
public ICollection<Member> TeamMembers { get; set; }
}
有什么建议吗?