LINQ Methods and Dynamic Sorting #268
-
Hi, Using the client, I can't figure a way to use Linq Methods to do dynamic sorting. The only way I know of is using Linq query syntax and I'm getting an error ....... "The method 'OrderBy' cannot follow the method 'Select' or is not supported. Try writing the query in terms of supported methods or call the 'AsEnumerable' or 'ToList' method before calling unsupported methods." This is the following code and the orderByDynamic works against other data sources (Ef.core)..
Is the problem above because there's a select in the Linq query? My main issue is that of implementing dynamic sorting somehow.......... Does anyone have suggestions to implement dynamic sorting please? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Is there any reason your cannot use the order by as part of the query? |
Beta Was this translation helpful? Give feedback.
-
How would it be done to dynamically set the column/columns to be ordered within the Linq query?
…________________________________
From: MattB ***@***.***>
Sent: 11 April 2022 17:40
To: microsoft/PowerPlatform-DataverseServiceClient ***@***.***>
Cc: JohnrFinney ***@***.***>; Author ***@***.***>
Subject: Re: [microsoft/PowerPlatform-DataverseServiceClient] LINQ Methods and Dynamic Sorting (Issue #261)
Is there any reason your cannot use the order by as part of the query?
See: https://github.com/MicrosoftDocs/powerapps-docs/blob/main/powerapps-docs/developer/data-platform/org-service/linq-query-examples.md#use-the-orderby-operator
—
Reply to this email directly, view it on GitHub<#261 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJJZQNW2HM3ZJUNVQ53FIDVERIY7ANCNFSM5TBOTSGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
In that scenario you would use late bound linq queries.. see here for an example LateBoundQuery MattB |
Beta Was this translation helpful? Give feedback.
In that scenario you would use late bound linq queries.. see here for an example LateBoundQuery
MattB