Task.Run中批量写数据,偶尔出现Value cannot be null. 返回
SqlSugar
沟通中
1
675
悬赏:0 飞吻
执行代码:
var task = Task.Run(async () =>
{
var rows = await Context.Insertable<DeviceLog>(deviceLogs).SplitTable().ExecuteCommandAsync();
});
报错信息:Value cannot be null. (Parameter 'hostEnvironment') at SqlSugar.SplitInsertable`1.ExecuteCommandAsync()
热忱回答(1)
-
小杰 VIP0
2026/1/3Task中需要db.copynew出新的db
0 回复