c# - Can't get my code for getContinuation working -
c# - Can't get my code for getContinuation working -
i trying retrieve entire list of info odata source, can't seem getcontinuation working... code have far follows:
var nwd = new odataservicereference.northwindentities(new uri("http://services.odata.org/northwind/northwind.svc/")); var res1 = nwd.orders //response .orderby(o => o.orderid) .select(o => new { o.orderid, o.customer.companyname, o.customer.contactname, o.employee.firstname, o.employee.lastname, o.order_details }) dataservicequery; var response = (queryoperationresponse<order>) nwd.execute<order>(new uri(res1.tostring())); //var response = res1.execute() queryoperationresponse<odataservicereference.order>; var res1list = new list<order>(response); dataservicequerycontinuation<order> token; while ((token = response.getcontinuation()) != null) { response = nwd.execute<order>(token) queryoperationresponse<order>; res1list.addrange(response); }
i getting next error:
any help great!
try replacing the order
odataservicereference.order
such execute<order>
execute<odataservicereference.order>
, on see if helps.
c# linq asp.net-mvc-4 odata
Comments
Post a Comment