ASP.NET Web API Serialized JSON Error: “Self Referencing loop”

前端 未结 2 1930
情书的邮戳
情书的邮戳 2021-01-15 03:43

Been a long struggle with this one. I\'m working with an ASP.NET web API to provide clean and easy HTTP/JSON interaction with a database. I have an entity name Reservation w

2条回答
  •  情歌与酒
    2021-01-15 04:29

    Mark the references with IgnoreDataMember attribute and let us know if that helped.

    [IgnoreDataMember]
    public virtual Equipment Equipment { get; set; }
    
    [IgnoreDataMember]
    public virtual ReservationState ReservationState { get; set; }
    

提交回复
热议问题