Accessing transparent identifier in select throwing exception.
var result = (from t1 in table1
join t2 in table2 on t1.col1 equals t2.col1 into myTable1
from a in myTable1.DefaultIfEmpty()
join t3 in table3 on t1.col2 equals t3.col2 into myTable2
from b in myTable2.DefaultIfEmpty()
where t1.col1 == 1
select new
{
prop1 = b,
prop2 = myTable1,
prop3 = myTable1.Count()
});
Exception:
variable 'myTable1' of type 'System.Collections.Generic.IEnumerable' referenced from scope '', but it is not defined.