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);
}
}