Thats because you try to run this as a C# Expression
in Linqpad. What you need it to set it to C# Statement(s)
in the dropdown just above the code area.
The C# Expression
-option is used if you want to try out pure Linq-statements against a datasource.