Expression variables in query expressions (
An expression variable is considered to be a promoted expression variable, when it's declared in the expression of a second or subsequent
from clause, a
let clause or a
where clause and it's also referenced in one or more following clauses of the same query (but not across an
into clause). Such expression variables are promoted into range variables.
Expression variables are allowed in all query clauses, but they affect how the query is translated only if they are promoted expression variables.
For an expression
e with one or more promoted expression variables
vn, its expanded form
ee is the anonymous object creation expression fragment
eo = e, v1, ... vn, where
eo is a compiler generated identifier that is invisible and inaccessible, except when mentioned in this section.