1 回答
TA贡献1872条经验 获得超3个赞
对问题进行详细讨论后,发现存储过程未正确返回 OUTPUT 参数。上述问题的最终解决方案需要修改代码:
[HttpPost]
private IActionResult Stock([FromBody] List<spGetNewStockCountHeader_Result> jsonvalues)
{
ObjectParameter TransactionId = new ObjectParameter("TransactionId", typeof(Int32));
foreach (spGetNewStockCountHeader_Result Datastock in jsonvalues)
{
spGetNewStockCountHeader_Result Stockobject = new spGetNewStockCountHeader_Result();
Stockobject.UserID = Datastock.UserID;
Stockobject.created = Datastock.created;
Stockobject.CompanyID = Datastock.CompanyID;
Stockobject.modified = Datastock.modified;
Stockobject.modifieduserid = Datastock.modifieduserid;
Stockobject.confirm = Datastock.confirm;
Stockobject.ShopId = Datastock.ShopId;
enqentities.spGetNewStockCountHeader(Datastock.UserID, Datastock.created, Datastock.CompanyID, Datastock.modified, Datastock.modifieduserid, Datastock.confirm,Datastock.ShopId, TransactionId);
}
return Ok(new { data = TransactionId.Value});
}
在 Angular 应用程序中获取该TransactionId值后,您可以使用该值将其作为查询字符串或 POST 正文中的参数发送到下一个方法。
- 1 回答
- 0 关注
- 89 浏览
添加回答
举报