score:1

Accepted answer
 var output = (from r in trades
                      join p in refdata on r.payindex equals p.indexlabel
                      into g1
                      from s in g1.defaultifempty()
                      join t in refdata on r.recindex equals t.indexlabel into g2
                      from a in g2.defaultifempty()
                      select trade { id=r.id,payindex=r.payindex,recindex=r.recindex, reccurrency = a != null ? a.symbol : "", paycurrency = s != null ? s.symbol : ""}).tolist();

score:0

    var output = (from r in trades
                      join p in refdata on r.payindex equals p.indexlabel
                      into g1
                      from s in g1.defaultifempty()
                      join t in refdata on r.recindex equals t.indexlabel into g2
                      from a in g2.defaultifempty()
                      select new { r, recsymbol = a?.symbol, paysymbol = s?.symbol }).tolist();

        output.foreach(o =>
        {
            o.r.paycurrency = o.paysymbol;
            o.r.reccurrency = o.recsymbol;
        });

Related Query

More Query from same tag