【发布时间】:2021-07-06 08:07:56
【问题描述】:
我有一个 get 方法。此方法调用来自不同项目的端点并获取客户信息。我想在另一个班级使用这个客户的信息。但我不知道如何访问它。
可以选择将我通过该方法获得的信息写入数据库,然后从那里读取,但客户数量可能很高,并且客户信息可能已经更新。这就是为什么我必须随时打电话。
我的GetCustomerInformation(customerIdList) 方法返回:return Ok(customerInfoList);
当我想在另一个班级获得customerInfoList 时,我尝试了类似的方法:
var customerList = _customerInfoController.GetCustomerInformation(customerIdList).Result;
它返回一个ActionResult,我怎样才能得到customerInfoList 为List?
【问题讨论】:
标签: c# asynchronous get actionresult