c# - 无法在同一解决方案中的不同项目上在 C# 中从类转换为类
问题描述
无法从 ElasticCoreWebApi.Controllers.AcquirerController.AcquirerReportParameters 转换为 ElasticCoreWebApi.BLL.ElasticSettledTranaction.AcquirerReportParameter
ElasticCoreWebApi 有 ElasticCoreWebApi.BLL 操作的参考
ElasticCoreWebApi.AcquirerController 有类
public class AcquiringReportParameters
{
public string reportname { get; set; }
public int merchantId { get; set; }
public string branchCodes { get; set; }
public string fromDate { get; set; }
public string toDate { get; set; }
public string merchantName { get; set; }
public string batchNo { get; set; }
public string terminalId { get; set; }
public string merchantNumber { get; set; }
public string merchantBranchName { get; set; }
public string dRCR { get; set; }
public string mID { get; set; }
public int pageSize { get; set; }
public int pageIndex { get; set; }
}
在 Acquirer 控制器中,我正在调用第二种方法并像这样传递参数,我在类中映射了数据
AcquiringReportParameters parameters = new AcquiringReportParameters();
ElasticSettlementTransactionBLL ElasticBLL = new ElasticSettlementTransactionBLL();
*var test = await ElasticBLL.GetSettledParameterTransaction(parameters);*
*I am getting error here in the parameter*
ElasticCoreWebApi.BLL.ElasticSettledTransaction.cs 有类
public class AcquiringReportParameters
{
public string reportname { get; set; }
public int merchantId { get; set; }
public string branchCodes { get; set; }
public string fromDate { get; set; }
public string toDate { get; set; }
public string merchantName { get; set; }
public string batchNo { get; set; }
public string terminalId { get; set; }
public string merchantNumber { get; set; }
public string merchantBranchName { get; set; }
public string dRCR { get; set; }
public string mID { get; set; }
public int pageSize { get; set; }
public int pageIndex { get; set; }
}
这是我正在调用的方法
public async Task<string> GetSettledParameterTransaction(AcquiringReportParameters parameters)
解决方案
推荐阅读
- excel - 将 excel 与另一个具有动态选项卡名称的已关闭 excel 链接
- javascript - 使用 Javascript Dropbox API 上传带有块的大文件
- google-cloud-platform - 如何从 GCP Bucket 提供静态文件并从任何未找到的路径重定向到 index.html,状态为 200 而不是 404
- javascript - 在两个对象之间映射值并读取值
- ruby-on-rails - 在机械化中按占位符查找元素
- javascript - Apps 脚本 -> 由于浏览器更新,在主页上加载 iframe 表单时出错
- python - Lambda:创建实例:启动后运行命令
- arrays - 打印数组只导致第一个值被打印到excel中?
- sql - SQL 创建具有真/假列的视图
- php - 将 SQL 转换为 Doctrine 查询