解决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; }
    }

原文地址:https://www.cnblogs.com/6654-cui/p/5433973.html