解决model first中一对多的循环引用问题

public partial class R_UserInfo_ActionInfo
    {
        public int ID { get; set; }
        public bool IsPass { get; set; }
        public int UserInfoUId { get; set; }
        public int ActionInfoID { get; set; }
        [JsonIgnoreAttribute]//防止一对多或者多对一的产生的循环引用
        public virtual UserInfo UserInfo { get; set; }
        [JsonIgnoreAttribute]
        public virtual ActionInfo ActionInfo { get; set; }
    }

posted @ 2016-04-26 10:11  6654  阅读(118)  评论(0编辑  收藏  举报