我得到 AssociationType 'Committee_Member_Contact' 具有参照完整性约束,无法映射到 EDMX 文件中。在我的数据库中,PK和FK之间没有关系。Committee_Member
表可以有多个Contact's. I have created
参照约束as 'Contact
是主要的和Committee_Member
从属的。
public partial class Committee_Member
{
public byte[] Committee_Member_Id { get; set; }
public byte[] Contact_Id { get; set; }
public string Committee_Code { get; set; }
public string External_Source_Name { get; set; }
public Nullable<System.DateTime> External_Last_Update { get; set; }
public virtual Contact Contact { get; set; }
}
public partial class Contact
{
public Contact()
{
this.Committee_Member_SPE = new HashSet<Committee_Member_SPE>();
}
public byte[] Contact_Id { get; set; }
public string First_Name { get; set; }
public string Last_Name { get; set; }
....
public virtual ICollection<Committee_Member_SPE> Committee_Member_SPE { get; set; }
}
有什么解决办法吗?