18 lines
301 B
C#
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;
|
|
}
|
|
}
|
|
}
|