mahjong_group/server/CoreCms.Net.Repository/SqlSugarExtensions.cs
2026-01-01 14:35:52 +08:00

18 lines
301 B
C#

using SqlSugar;
namespace CoreCms.Net.Repository
{
internal static class SqlSugarExtensions
{
internal static ISugarQueryable<T> WithNoLockOrNot<T>(this ISugarQueryable<T> query,bool @lock = false)
{
if (@lock)
{
query = query.With(SqlWith.NoLock);
}
return query;
}
}
}