开发者

List of Integers in Entity Framework

开发者 https://www.devze.com 2023-03-28 21:23 出处:网络
public Class An开发者_JS百科imal { public int Id{get;set;} public string Name {get;set;} public ICollection<int> OwnerIds{ get; set; }
public Class An开发者_JS百科imal
{
    public int Id{get;set;}
    public string Name {get;set;}

    public ICollection<int> OwnerIds{ get; set; }
}

Animal class contains a list of int (ownerIds).

Entity framework is not creating a table for OwnerIds, how can i map this??


Add second entity Owner, only property is int ID, add a relationship/association between them.

0

精彩评论

暂无评论...
验证码 换一张
取 消