New Posts New Posts RSS Feed: SortSelector and EntityQueryPager
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

SortSelector and EntityQueryPager

 Post Reply Post Reply
Author
mseeli View Drop Down
Newbie
Newbie
Avatar

Joined: 20-Sep-2010
Location: Switzerland
Posts: 31
Post Options Post Options   Quote mseeli Quote  Post ReplyReply Direct Link To This Post Topic: SortSelector and EntityQueryPager
    Posted: 19-Nov-2012 at 1:11am
I have been using EntityQueryPagedCollectionView in DevForce 2010 and am now changing it over to EntityQueryPager in DevForce 2012.

I have a rather complex sort expression (One that relyes on a ServerSide Function)
The current code looks like this

enq = enq.OrderBy(x => MySqlLinqFunctions.CacheField(x.Cache, SortFieldIdx));

where enq is the query that selects the records from the databse and here I add the OrderBy clause to it.
MySquLinqFunction is a server side function.

In DevForce 2012 I have to use a SortSelector for my EntityQueryPager

Can you please give me a hint how to do this?

I probably should use the constructor


But I have no Idea what is meant with string MethodName (1st parameter)
Would I pass x => MySqlLinqFunctions.CacheField(x.Cache, SortFieldIdx) as the second parameter?

Thank you 
Markus Seeli
Back to Top
cefernan View Drop Down
Groupie
Groupie


Joined: 13-Jul-2012
Posts: 70
Post Options Post Options   Quote cefernan Quote  Post ReplyReply Direct Link To This Post Posted: 19-Nov-2012 at 6:33am
I need to create a sort expression with more than one property and different directions, maybe somebody can help me too.

Thanks.
Back to Top
cefernan View Drop Down
Groupie
Groupie


Joined: 13-Jul-2012
Posts: 70
Post Options Post Options   Quote cefernan Quote  Post ReplyReply Direct Link To This Post Posted: 20-Nov-2012 at 12:16pm
I have used ThenBy in the SortSelector and I have solved my problem (more than 1 property).

Thanks and sorry to post in the same topic :)
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 27-Nov-2012 at 12:32pm
Hi mseeli,

Unfortunatelly, the ctor below

SortSelector Constructor(String,IPredicateDescription,ListSortDirection)

will not be of help as you won't be able to invoke a server side function using the EntityQueryPager.

sbelini.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down