0

I'm migrating from SimpleOdataClient to MS ODataClient and I wonder how to execute DataServiceActionQueries in a batch. Executing DataServiceRequests in a batch is not a problem, but I haven't found a solution for DataServiceActionQueries. Is it possible?

krombi
  • 504
  • 1
  • 4
  • 15
  • What is the difference between DataServiceRequests and DataServiceActionQueries? You can put the query into a request. – jdweng Jul 22 '20 at 12:07
  • The client code generator of OData Connected Services generates a Microsoft.OData.Client.DataServiceActionQuery for my unbound actions. How can I put this into a request? I think I'm too stupid right now – krombi Jul 22 '20 at 12:38
  • The query is public DataServiceActionQuery (Microsoft.OData.Client.DataServiceContext context, string requestUriString, params Microsoft.OData.Client.BodyOperationParameter[] parameters); So you just need to send the object in the request. For example the context is a set of classes so you can serialize the classes (binary serialize or xml serialize) and send in the body of a request. You just have to define your own protocol for send and receiving the objects. – jdweng Jul 22 '20 at 12:49
  • Okay, thank you! I will try this. But of course this is far from being convenient... – krombi Jul 22 '20 at 13:10

0 Answers0