I'm having trouble creating a Lambda sentence with Group by and Order By Together.
How do I group by the Scope and IDScope column, and sort by IDEscope.
Judgment follows.
public static List<Escopos> EscoposCalCliente(int IDCalCLiente)
{
using (entidadesIUS entidades = new entidadesIUS())
{
return entidades.Escopos.Where(e => e.CALClientes.Any(cc => cc.IDCALCliente == IDCalCLiente)).
ToList().
GroupBy(es => new {.IDEscopo, es.IDEscopo }).
SelectMany(esc => esc.OrderBy(escp => escp.IDEscopo));
}
}