【修复】修复部分Repository层使用WithNolock属性未生效的问题。

This commit is contained in:
大灰灰
2022-07-06 23:58:15 +08:00
parent 4a6f285688
commit d122d4505e
7 changed files with 14 additions and 7 deletions

View File

@@ -63,10 +63,11 @@ namespace CoreCms.Net.Repository
createTime = p.createTime,
userNickName = sc.nickName
})
.With(SqlWith.NoLock)
.MergeTable()
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
.WhereIF(predicate != null, predicate)
.With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
.ToPageListAsync(pageIndex, pageSize, totalCount);
else
page = await DbClient.Queryable<CoreCmsUserBalance, CoreCmsUser>((p, sc) => new JoinQueryInfos(
JoinType.Left, p.userId == sc.id))

View File

@@ -71,10 +71,11 @@ namespace CoreCms.Net.Repository
type = p.type,
message = p.message
})
.With(SqlWith.NoLock)
.MergeTable()
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
.WhereIF(predicate != null, predicate)
.With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
.ToPageListAsync(pageIndex, pageSize, totalCount);
else
page = await DbClient.Queryable<CoreCmsUserTocash, CoreCmsUser>((p, sc) => new JoinQueryInfos(
JoinType.Left, p.userId == sc.id))