Limit of Graph
When executing a query with nested queries in it the result are limited to a depth of 2 levels. and the remaining levels are not displayed properly (instead a "Limit of Graph" error is displayed).
Would it be possible to increase this depth? Or are there other ways to achieve this with a minimum of code?
Here's an example of what I'm doing:
from level1 in Level1Table
select new {
Level1Obj = level1,
Children = (from level2 in level1.Level2Children
select new {
Level2Obj = level2,
Children = (from level3 in level2.Level3Children
select new {
Level3Obj = level3,
Children = level3.Level4Children})
})
}

This is now complete. In addition to the workarounds mentioned, recent versions of LINQPad display hyperlinks which allow expansion to any desired depth.
-
Another workaround is to choose "Results to Grids" mode. Either click the toolbar button or call Dump with true. In Grids mode, LINQPad walks associations lazily (only when clicked) and so can handle unlimited depth.
-
Adam Zuckerman commented
Is there a way to set the default maximum nesting level to something other than 3?
-
You can call Dump() with a nesting level - e.g. Dump(8)
-
Maslow commented
I like the idea even if it can be worked around, I'm out of votes for now, perhaps I'll go search for one that can afford less votes
-
Stif commented
Nevermind, I found a better way to do this.
Like so:
from level1 in Level1Table
from level2 in level1.Level2Children
from level3 in level2.Level3Children
select new {
Level1Obj = level1,
Children = new {
Level2Obj = level2,
Children = new {
Level3Obj = level3,
Children = level3.Level4Children})})
}