Serialization will fail if a model contains multiple linked entities of the same type. Take the following simple example:
public class PersonModel
{
public int Id { get; set; }
public String FirstName { get; set; }
public String LastName { get; set; }
}
public class MusicLessonModel
{
public DateTime Date { get; set; }
public int TeacherPersonId { get; set; }
public PersonModel TeacherPerson { get; set; }
// This is where your bad day begins :)
public int StudentPersonId { get; set; }
public PersonModel StudentPerson { get; set; }
}
Assuming the appropriate controllers have been configured etc, calling http://hostname/music-lessons?include=person results in an exception being raised prior to my code change in PR #34.