C# 实体框架中的整数列表 公共类动物 { 公共int Id{get;set;} 公共字符串名称{get;set;} 公共ICollection所有者ID{get;set;} }
Animal类包含int(所有者ID)列表C# 实体框架中的整数列表 公共类动物 { 公共int Id{get;set;} 公共字符串名称{get;set;} 公共ICollection所有者ID{get;set;} },c#,entity-framework,entity-framework-4,entity-framework-4.1,C#,Entity Framework,Entity Framework 4,Entity Framework 4.1,Animal类包含int(所有者ID)列表 实体框架没有为OwnerID创建表,我如何映射它???添加第二个实体所有者,唯一的属性是int ID,添加它们之间的关系/关联。EF只能映射相关实体的集合。 public Class Animal { public int Id{get;set;} public string Name {get;set;} public ICollection<int> OwnerIds{ get; set; } }
实体框架没有为OwnerID创建表,我如何映射它???添加第二个实体所有者,唯一的属性是int ID,添加它们之间的关系/关联。EF只能映射相关实体的集合。
public Class Animal
{
public int Id{get;set;}
public string Name {get;set;}
public ICollection<int> OwnerIds{ get; set; }
}