mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:03:27 +08:00
【修复】修复后台支付单生成校验失败的问题。
【优化】新增SqlSugarExtensions扩展类,增加是否使用WITH(NoLock)方法扩展封装,删除BaseRepository中的一些冗余代码。
This commit is contained in:
19
CoreCms.Net.Repository/SqlSugarExtensions.cs
Normal file
19
CoreCms.Net.Repository/SqlSugarExtensions.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user