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 ; }