数据库操作日志报错 有些表可以 有些不行 返回

SqlSugar 老数据
2 1913
该叫什么 5394 发布于2020/2/28
悬赏:5 飞吻
System.NullReferenceException: 未将对象引用设置到对象的实例。
   在 SqlSugar.InsertableProvider`1.<>c__DisplayClass95_2.<GetDiffTable>b__3(EntityColumnInfo it)
   在 System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   在 SqlSugar.InsertableProvider`1.GetDiffTable(String sql, Nullable`1 identity)
   在 SqlSugar.InsertableProvider`1.After(String sql, Nullable`1 result)
   在 SqlSugar.InsertableProvider`1.ExecuteCommand()
   在 HYN.Platform.WebService.AdminNew.Test.WebSocketServer(String condition) 位置 D:\新建文件夹\HYN.Platform\HYN.Platform.WebService\AdminNew\Test.asmx.cs:行号 272


热忱回答(2)

  • 5394 5394 VIP0
    2020/2/29

    DataCon.DB().Insertable(sku1).EnableDiffLogEvent(new { currentMethod = MethodBase.GetCurrentMethod() }).ExecuteCommand();

    这个不行


    DataCon.DB().Insertable(searchHistory).EnableDiffLogEvent(new { currentMethod = MethodBase.GetCurrentMethod() }).ExecuteReturnIdentity();

    但是这个可以

    0 回复
  • 5394 5394 VIP0
    2020/2/29

    但是把自定义参数 序列化之后就可以了

    0 回复