- Thomas Rolseth
- SnapDevelop
- Wednesday, 13 November 2019 03:30 PM UTC
In my PowerBuilder Client, I want to use the JsonPackage object to send the result sets of two datastores to our Web API that was created with SnapDevelop. Here is my PB code:
//set values of JSONPackage with API datastores
ljpk_submit.setvalue( "Partials", ids, True)
ljpk_submit.setvalue( "Codes", ids2, True)
rc = g_APIClient.Submit(gs_webapi_url + is_controller + "/assigncode",is_response,ljpk_submit)
Now I need to loop through and do processing on the submitted rows for each datastore. What is the best way to do that in my API controller? Mainly I need to extract each datastore from the package but am unclear on how to do that. Below is my controller code. Thanks, Tom
[HttpPost]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public ActionResult<IDataPacker> ClientAction(IDataUnpacker unpacker)
{
try
{
var packer = new DataPacker();
???
return Ok();
}
catch (Exception ex)
{
return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
}
}
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.