c# - Composite c1 Odata Pageresult -


i'm having difficulties using odata in combination pageresult. correct result, 5 items if set [queryable(pagesize=5)]

but no nextlink, expect, can next results of page 2 example.

composite c1 uses it's own xml datastore, , think that's core of problem.

all of examples found odata v3 (the version installed if use http://www.composite.net/products/add-ons/all/composite.aspnet.webapi) tell me use [queryable(pagesize=5)] , should work out of box. use entity framework, don't , think that's breaks.

this result, without nextlink:

<data>     <imageitem>         <id>1eeb46e3-1446-45e8-bab2-03ccb637b2ab</id>         <title/>         <subtitle/>     </imageitem>     <imageitem>         <id>1eeb46e3-1446-45e8-bab2-03ccb637b2ab</id>         <title/>         <subtitle/>     </imageitem>     <imageitem>         <id>1eeb46e3-1446-45e8-bab2-03ccb637b2ab</id>         <title/>         <subtitle/>     </imageitem>     <imageitem>         <id>1eeb46e3-1446-45e8-bab2-03ccb637b2ab</id>         <title/>         <subtitle/>     </imageitem>     <imageitem>         <id>1eeb46e3-1446-45e8-bab2-03ccb637b2ab</id>         <title/>         <subtitle/>     </imageitem> </data> 

code:

     public class imagescontroller : apicontroller     {         public pageresult get(odataqueryoptions options)         {             using (var c = new dataconnection())             {                 var querysettings = new odataquerysettings() { pagesize = 20 };                  var filtered = options.applyto(c.get(), querysettings).cast().tolist().asqueryable();                 return new pageresult(filtered, request.getnextpagelink(), 20);             }         }     }  

request.getnextpagelink() returns http://xx.local/api/images?$skip=5

variable filtered has list of 19 imageitems. , filtered.count() returns 19 well.

does have suggestion or solution? composite c1 installation bare bones one, no handlers. composite c1 4.2 update 1, build no. 4.2.5287.17495

try removing [queryable] attribute, prevents proper rendering of pageresult response.


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -