Cześć
Jak rozwiązać ten problem?
W oznaczonym miejscu otrzymuję błąd:
The name 'x' is not in scope on the right side of 'equals'. Consider swapping the expressions on either side of 'equals'.
Błąd w linijce
m = x.Month > 12 ? x.Month : z.Month
var qry = from l in PPP
where l.CompanyId == Cid && l.RowNo == "1000" && l.Year >= 2022
join x in HHH on new { cid = l.CompanyId, id = l.HeaderId } equals new { cid = x.CompanyId, id = x.Id }
join z in ZZZ on new { cid = l.CompanyId, y = x.Year, m = x.Month } equals new { cid = z.CompanyId, y = z.Year, m = x.Month > 12 ? x.Month : z.Month } Select new OBJ {...}