asp.net web api - OData $orderby clause on collection property -


i have following classes :

 public class parent  {      public string parentprop { get; set; }      public ienumerable<child> manychildren { get; set; }  }   public class child  {      public string childname { get; set; }      public int value { get; set; }  } 

say have odata operation defined returns ienumberable<parent>. can write $orderby clause performs following operation ('parents' ienumerable<parent>) :

parents.orderby(x => x.manychildren.single(y => y.childname == "child1").value); 

i know can write custom actions (http://msdn.microsoft.com/en-us/library/hh859851(v=vs.103).aspx) ordering me, i'd rather use $orderby clause. (the question asked similar little dated - how can order objects according attribute of child in odata?)

as tried possible nesting $orderby in $expand be:

odata/user?&$select=active,description,name,userid&$expand=company($select=active,name,createdby,companyid;$orderby=active asc) 

and somthing like:

order [project2].[userid] asc, [project2].[c19] asc 

will order company collection each user separately.

i think in version odata client .net 6.7.0 supported, in release notes writhing:

in query options $id, $select, $expand(including nested query options)....

i see in version 6.1 values nested options exist , in:

dataqueryoptions->selectexpand->selectexpandclasue->selecteditems->expandnavigationitem->orderbyoption

but not working.

i tried , system.web.odata 5.6 , releated dependencies seams not working.

my conclusion:

seams everiting prepared dataqueryoptions exist nested orderby not working.

like find out standard seams going in direction. https://issues.oasis-open.org/browse/odata-32


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -