in the regular linq its fine, but in dynamic linq doesnt have this method, how can i find a solution Here is my error code in dynamic linq
q = " CRM_ASSENTAMENTOS.Count > 0 && CRM_ASSENTAMENTOS.OrderByDescending(ID_ASSENTAMENTO).FirstOrDefault().ID_PRIORIDADE == 2";
ocorrencias = ocorrencias.Where(q);
and my regular linq
ocorrencias = ocorrencias.Where(o => o.CRM_ASSENTAMENTOS.OrderByDescending(a => a.ID_ASSENTAMENTO).FirstOrDefault().ID_PRIORIDADE == 2);
The inline OrderByDescending(...)
is supported by System.Linq.Dynamic.Core
For an example see this QueryableTests.OrderByDescending.cs#L36
Can you try that NuGet library?