EF 导航属性

1对1导航属性

 [ForeignKey("UsersId")]                                                                      //外键ID
[JsonIgnore]
public virtual UsersExtend UsersExtend { get; set; }


 1对多导航属性

  [JsonIgnore]
  public virtual ICollection<UsersExtend> UsersExtend { get; set; }

 

posted @ 2019-07-09 17:28  进步者One  阅读(385)  评论(0)    收藏  举报