Using Insight.Database, I can query for an object with children and its grandchildren:
var someObject = connection.Query("SomeStoredProc", new {ParentId = id}, Query.Returns(Some<Parent>.Records)
.ThenChildren(Some<Child>.Records)
.ThenChildren(Some<Grandchild>.Records,
parents: parent=> parent.Children,
into: (child, grandchildren) => child.Grandchildren = grandchildren));
I have a set of tables Parent -> Child -> Grandchild -> Great-Grandchild
I tried using RecordId, ParentId, ChildRecords attribute to no avail. Also, all my classes are decorated with [BindChildren(BindChildrenFor.All)].
Is there a way I have the populate the Great-Grandchildren? Thanks!