You must reference at least one range variable on both sides of the 'Equals' operator

You must reference at least one range variable on both sides of the 'Equals' operator. Range variable(s) <variable(s)> must appear on one side of the 'Equals' operator, and range variable(s) <variable(s)> must appear on the other.

Range variables identified for collections to be joined in a LINQ query must be on opposite sides of the Equals operator, depending on the collection they are identified for. That is, range variables identified for one of the collections being joined must be on the opposite side of the Equals operator from range variables for the other collection being joined. Range variables from separate collections cannot be mixed on the same side of the Equals operator.

At least one variable from each collection being joined must be referenced on each side of the Equals operator.

Error ID: BC36622

See also