频繁的使用Storageable 操作同一条数据会导致表死锁原因是什么 返回

SqlSugar 待处理
138

                var item = new CacheEntity { userId = userId, moduleKey = moduleKey, cacheValue = cacheValue };

                var result = await _repo.Context.Storageable(item)

                    .WhereColumns(it => new { it.userId, it.moduleKey }) // 指定条件,插入还是更新

                    .TranLock(DbLockType.Wait).ExecuteCommandAsync() > 0;


热忱回答0