Coreshop/CoreCms.Net.Repository/SqlSugarExtensions.cs
2025-08-17 15:36:03 +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;
}
}
}