From 2386ee0ff3b38c039f1d19a62b23113d89b4bdfc Mon Sep 17 00:00:00 2001 From: JianWeie Date: Mon, 14 Mar 2022 00:57:44 +0800 Subject: [PATCH] =?UTF-8?q?#=202022-03-14=20###=201.3.9=20=E5=BC=80?= =?UTF-8?q?=E6=BA=90=E7=A4=BE=E5=8C=BA=E7=89=88=EF=BC=9A=20=E3=80=90?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8DBaseRepository?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BA=A4=E4=BA=92=E5=B1=82=E4=BB=93=E5=82=A8?= =?UTF-8?q?SqlWith.NoLock=E4=BD=BF=E7=94=A8=E6=96=B9=E5=BC=8F=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82=20###=200.2.8=20?= =?UTF-8?q?=E4=B8=93=E4=B8=9A=E7=89=88=EF=BC=9A=20=E3=80=90=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=91=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=8E=86=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E5=8A=9F=E8=83=BD=E3=80=82=E5=AE=9E=E7=8E=B0=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E6=97=A5=E5=8E=86=E7=AD=BE=E5=88=B0=E8=8E=B7=E5=BE=97?= =?UTF-8?q?=E7=A7=AF=E5=88=86=EF=BC=8C=E4=BD=99=E9=A2=9D=E3=80=82=E3=80=90?= =?UTF-8?q?=E9=9D=9E=E7=A0=B4=E5=9D=8F=E6=80=A7=E6=97=A0=E7=BC=9D=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8A=9F=E8=83=BD=E3=80=91=20=E3=80=90=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=91=E5=A2=9E=E5=8A=A0=E2=80=9C=E8=BF=9E=E7=BB=AD?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E5=91=A8=E6=9C=9F=E2=80=9D=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8C=E7=94=A8=E4=BA=8E=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=9A=84=E8=AE=BE=E7=BD=AE=EF=BC=8C=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E9=87=8D=E7=BD=AE=E6=B8=85=E9=9B=B6=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=BF=9E=E7=BB=AD=E7=AD=BE=E5=88=B0=E8=AE=A1=E6=95=B0=E3=80=82?= =?UTF-8?q?=20=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8DBaseRe?= =?UTF-8?q?pository=E6=95=B0=E6=8D=AE=E4=BA=A4=E4=BA=92=E5=B1=82=E4=BB=93?= =?UTF-8?q?=E5=82=A8SqlWith.NoLock=E4=BD=BF=E7=94=A8=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Repository/BaseRepository.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CoreCms.Net.Repository/BaseRepository.cs b/CoreCms.Net.Repository/BaseRepository.cs index 1b6bedc..6d877ab 100644 --- a/CoreCms.Net.Repository/BaseRepository.cs +++ b/CoreCms.Net.Repository/BaseRepository.cs @@ -1023,7 +1023,7 @@ namespace CoreCms.Net.Repository var totalCount = 0; var page = blUseNoLock ? DbBaseClient.Queryable().OrderByIF(!string.IsNullOrEmpty(orderBy), orderBy) - .WhereIF(predicate != null, predicate).Where(SqlWith.NoLock) + .WhereIF(predicate != null, predicate).With(SqlWith.NoLock) .ToPageList(pageIndex, pageSize, ref totalCount) : DbClient.Queryable().OrderByIF(!string.IsNullOrEmpty(orderBy), orderBy) .WhereIF(predicate != null, predicate).ToPageList(pageIndex, pageSize, ref totalCount); @@ -1047,7 +1047,7 @@ namespace CoreCms.Net.Repository RefAsync totalCount = 0; var page = blUseNoLock ? await DbBaseClient.Queryable().OrderByIF(!string.IsNullOrEmpty(orderBy), orderBy) - .WhereIF(predicate != null, predicate).Where(SqlWith.NoLock) + .WhereIF(predicate != null, predicate).With(SqlWith.NoLock) .ToPageListAsync(pageIndex, pageSize, totalCount) : await DbBaseClient.Queryable().OrderByIF(!string.IsNullOrEmpty(orderBy), orderBy) .WhereIF(predicate != null, predicate).ToPageListAsync(pageIndex, pageSize, totalCount); @@ -1072,7 +1072,7 @@ namespace CoreCms.Net.Repository var totalCount = 0; var page = blUseNoLock ? DbBaseClient.Queryable().OrderByIF(orderByExpression != null, orderByExpression, orderByType) - .WhereIF(predicate != null, predicate).Where(SqlWith.NoLock) + .WhereIF(predicate != null, predicate).With(SqlWith.NoLock) .ToPageList(pageIndex, pageSize, ref totalCount) : DbBaseClient.Queryable().OrderByIF(orderByExpression != null, orderByExpression, orderByType) .WhereIF(predicate != null, predicate).ToPageList(pageIndex, pageSize, ref totalCount); @@ -1097,7 +1097,7 @@ namespace CoreCms.Net.Repository RefAsync totalCount = 0; var page = blUseNoLock ? await DbBaseClient.Queryable().WhereIF(predicate != null, predicate).OrderByIF(orderByExpression != null, orderByExpression, orderByType) - .Where(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount) + .With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount) : await DbBaseClient.Queryable().WhereIF(predicate != null, predicate).OrderByIF(orderByExpression != null, orderByExpression, orderByType) .ToPageListAsync(pageIndex, pageSize, totalCount); var list = new PageList(page, pageIndex, pageSize, totalCount);