HOW TO query with linq GROUP BY multiple and SELECT

132 Views Asked by At

I already have the following code. But i dont know whats wrong. Why cant i do the group by with the select?

Any idea?

thanks!

lstPendientes = await (from item in db.erProcesaReenvio
                       group item by new
                       {
                           item.iderRegistroCredito,
                           item.cuentaClabe,
                           item.nombreCliente,
                           item.idCtaProcesar,
                           item.No_Cuenta,
                           item.afiliado,
                           item.ImporteCobrar
                       } into g
                       select new {
                           prop1 = g.iderRegistroCredito,
                           prop2 = g.cuentaClabe
                       });
1

There are 1 best solutions below

0
dlerma On BEST ANSWER

this works for me

g.Key.iderRegistroCredito