net core 注意事项

1,

  调用接口报错

  错误信息:{ 
                     “code”:500,
                     “message”:“资源服务器忙,请稍后再试,原因:An exception was thrown while activating Services.ProjectFileManageService -> Repository.ProjectFileRepository”,
                      “data”: null
                   }
 
  解决:在ProjectFileRepository的构造方法中不能加入IProjectFileRepository projectFileRepository这个参数。
  原因:。net 框架下,在构造函数中不能重复调用IProjectFileRepository 
 
2,
这个问题是因为在不同数据库,相同代码转换数据报的错误
情景:
    1,在Mysql中字段类型为int
    2,在oracle中字段类型为integer
    3,项目中定义的实体类中字段是 decimal , 在.net写代码的时候,使用ToDecimal时,调用oracle会报错误“ORA-00902:无效数据类型”,需使用ToInt32
posted @ 2022-06-09 09:49  zwbsoft  阅读(273)  评论(0编辑  收藏  举报