According to @albahari in a post to a thread in the LINQPad Forum:
Normally, anything types that you define end up as nested types, because LINQPad wraps everything that you enter into a class definition. You can tell LINQPad to extract the classes and define them as non-nested by adding the following to the beginning of your query:
Add support for the same to this project.