错误:Self referencing loop detected with type 'System.Data.Entity.DynamicProxies.tbldph_901D48A194FB31357

 添加[JsonIgnore] 可解决
 [Table("tbldph")]
public partial class tbldph
{
public tbldph()
{
tbldphcaselinks = new HashSet<tbldphcaselink>();
tbldphnotices = new HashSet<tbldphnotice>();
tbldphparticipants = new HashSet<tbldphparticipant>();
tbldphpagelinks = new HashSet<tbldphpagelink>();
} [Key]
public int DphId { get; set; } public int? Series_DphSeriesId { get; set; } [ForeignKey("Series_DphSeriesId")]
public virtual tbldphseries Series { get; set; } public long? Mc_UserId { get; set; } [ForeignKey("Mc_UserId")]
public virtual tbluser Mc { get; set; } public long? Creator_UserId { get; set; } [ForeignKey("Creator_UserId")]
public virtual tbluser Creator { get; set; }
public DateTime? CreateTime { get; set; } public DateTime? LastModifyTime { get; set; } public virtual ICollection<tbldphcaselink> tbldphcaselinks { get; set; } public virtual ICollection<tbldphnotice> tbldphnotices { get; set; } public virtual ICollection<tbldphpagelink> tbldphpagelinks { get; set; } [InverseProperty("tbldph")]
public virtual ICollection<tbldphparticipant> tbldphparticipants { get; set; } [InverseProperty("tbldph")]
public virtual ICollection<tbldphattachment> tbldphattachments { get; set; }
public string test { get; set; }
public string Content { get; set; }
}
 [Table("tbldphcaselink")]
public partial class tbldphcaselink
{
[Key]
public int DphCaseLinkId { get; set; } public int DphId { get; set; } public int CaseId { get; set; } public int? CheckID { get; set; } [JsonIgnore]
[ForeignKey("DphId")]
public virtual tbldph tbldph { get; set; }
}

解决办法:外键添加[JsonIgnore] 特性即可解决

最新文章

  1. 转:永久解决火狐浏览器出现的flash版本更新问题
  2. Linux下Nagios的安装与配置
  3. Mysql查询(笔记二)
  4. 由于本公司项目需要,现急需拥有微软MCSE证书的人才,一经录用,待遇从优!
  5. 函数还能这样玩儿~实现类似add(1)(2)(3)的函数
  6. c语言数组小练习
  7. asp.net访问网络路径方法(模拟用户登录)
  8. IOS 跳转到系统的url
  9. JVM类加载机制---类加载的过程
  10. Python爬虫基础之认识爬虫
  11. Oracle列转行函数LISTAGG()
  12. spring集成cxf实现webservice接口功能
  13. HTML meta头部小结
  14. JavaScript加强
  15. 5.mybatis实战教程(mybatis in action)之五:与spring3集成(附源码)
  16. systemctl自定义service
  17. 浅谈ASP.net中的DataSet对象
  18. jQuery实现布局高宽自适应
  19. PLSQL Developer V10 注册码
  20. POJ 2348 Euclid&#39;s Game(辗转相除博弈+自由度分析)

热门文章

  1. Raft 一致性算法论文译文
  2. 【深度好文】多线程之WaitHandle--&gt;派生-》Semaphore信号量构造
  3. 03 解析库之Beautifulsoup模块
  4. BZOJ3170: [Tjoi2013]松鼠聚会 - 暴力
  5. asp.net core 视图组件化
  6. 使用eclipse创建android项目的时候为什么会生成两个项目
  7. hdu-1069(dp)
  8. python 文件合并和编号
  9. SPSS-单因素方差分析(ANOVA) 案例解析
  10. 6.&lt;1&gt;四则运算的研究[栈]