From f5203782aa4856a3b9f5461551c6a9a9b283df91 Mon Sep 17 00:00:00 2001 From: tk Date: Fri, 29 Nov 2024 17:43:56 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A8=20iSelect=20=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E6=96=B9=E6=B3=95=E5=A2=9E=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip ci] --- .../Extensions/ISelectExtensions.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/backend/NetAdmin/NetAdmin.Infrastructure/Extensions/ISelectExtensions.cs b/src/backend/NetAdmin/NetAdmin.Infrastructure/Extensions/ISelectExtensions.cs index e648a120..bacc02cf 100644 --- a/src/backend/NetAdmin/NetAdmin.Infrastructure/Extensions/ISelectExtensions.cs +++ b/src/backend/NetAdmin/NetAdmin.Infrastructure/Extensions/ISelectExtensions.cs @@ -9,10 +9,11 @@ public static class ISelectExtensions /// 无锁无等待 /// public static ISelect WithNoLockNoWait(this ISelect me) + where T1 : class { return me #if DBTYPE_SQLSERVER - .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) + .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) #endif ; } @@ -21,11 +22,12 @@ public static class ISelectExtensions /// 无锁无等待 /// public static ISelect WithNoLockNoWait(this ISelect me) + where T1 : class // where T2 : class { return me #if DBTYPE_SQLSERVER - .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) + .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) #endif ; } @@ -34,12 +36,13 @@ public static class ISelectExtensions /// 无锁无等待 /// public static ISelect WithNoLockNoWait(this ISelect me) + where T1 : class // where T2 : class // where T3 : class { return me #if DBTYPE_SQLSERVER - .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) + .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) #endif ; } @@ -48,13 +51,14 @@ public static class ISelectExtensions /// 无锁无等待 /// public static ISelect WithNoLockNoWait(this ISelect me) + where T1 : class // where T2 : class // where T3 : class // where T4 : class { return me #if DBTYPE_SQLSERVER - .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) + .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) #endif ; } @@ -63,6 +67,7 @@ public static class ISelectExtensions /// 无锁无等待 /// public static ISelect WithNoLockNoWait(this ISelect me) + where T1 : class // where T2 : class // where T3 : class // where T4 : class // @@ -70,7 +75,7 @@ public static class ISelectExtensions { return me #if DBTYPE_SQLSERVER - .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) + .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) #endif ; } @@ -79,6 +84,7 @@ public static class ISelectExtensions /// 无锁无等待 /// public static ISelect WithNoLockNoWait(this ISelect me) + where T1 : class // where T2 : class // where T3 : class // where T4 : class // @@ -87,7 +93,7 @@ public static class ISelectExtensions { return me #if DBTYPE_SQLSERVER - .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) + .WithLock(SqlServerLock.NoLock | SqlServerLock.NoWait) #endif ; }