Entity framework self referencing loop detected [duplicate]
问题 This question already has answers here : JSON.NET Error Self referencing loop detected for type (21 answers) Closed yesterday . I have a strange error. I'm experimenting with a .NET 4.5 Web API, Entity Framework and MS SQL Server. I've already created the database and set up the correct primary and foreign keys and relationships. I've created a .edmx model and imported two tables: Employee and Department. A department can have many employees and this relationship exists. I created a new