Serialize one to many relationships in Json.net
问题 I am using the Entity Framework code first for data access and I have a Company class which has a collection of Employees. The Employee class also has a Company property. I would like to be able to serialize a Company and include the list of employees in the serialization. Here is Company: public class Company { public long Id { get; set; } public string Name { get; set; } public DateTime? Established { get; set; } public virtual IList<Employee> Employees { get; set; } public DateTime?