mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:33:27 +08:00
【优化】仓储底层增加常用统计数据的缓存处理。
This commit is contained in:
@@ -32,7 +32,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="pkValue">主键值</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体</returns>
|
||||
T QueryById(object pkValue, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="objId"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByIdAsync(object objId, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryByIDs(object[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryByIDsAsync(object[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryByIDs(int[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryByIDsAsync(int[] lstIds, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// </summary>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
List<T> Query(bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// </summary>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryAsync(bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
List<T> QueryListByClause(string strWhere, string orderBy = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
Task<List<T>> QueryListByClauseAsync(string strWhere, string orderBy = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, string orderBy = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate, string orderBy = "",
|
||||
bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -157,7 +157,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -170,7 +170,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -184,7 +184,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, int take,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -198,7 +198,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate, int take,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -211,7 +211,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="strOrderByFields">排序字段,如name asc,age desc</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, int take, string strOrderByFields = "",
|
||||
bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -224,7 +224,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="strOrderByFields">排序字段,如name asc,age desc</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate, int take,
|
||||
string strOrderByFields = "", bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -235,7 +235,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
T QueryByClause(Expression<Func<T, bool>> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
T QueryByClause(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -270,7 +270,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -284,7 +284,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseTranLock">是否使用TranLock</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseWithTranLockAsync(Expression<Func<T, bool>> predicate,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseTranLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
@@ -706,16 +706,20 @@ namespace CoreCms.Net.IRepository
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
int GetCount(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
int GetCount(Expression<Func<T, bool>> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据总数
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<int> GetCountAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
Task<int> GetCountAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
@@ -723,8 +727,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
int GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, int>> field, bool blUseNoLock = false);
|
||||
int GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, int>> field, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
@@ -732,8 +738,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<int> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, int>> field, bool blUseNoLock = false);
|
||||
Task<int> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, int>> field, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
@@ -741,8 +749,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
decimal GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, decimal>> field, bool blUseNoLock = false);
|
||||
decimal GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, decimal>> field, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
@@ -750,8 +760,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<decimal> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, decimal>> field, bool blUseNoLock = false);
|
||||
Task<decimal> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, decimal>> field, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
@@ -759,8 +771,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
float GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, float>> field, bool blUseNoLock = false);
|
||||
float GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, float>> field, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
@@ -768,8 +782,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<float> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, float>> field, bool blUseNoLock = false);
|
||||
Task<float> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, float>> field, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
#endregion
|
||||
|
||||
#region 分页查询
|
||||
@@ -783,7 +799,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
IPageList<T> QueryPage(Expression<Func<T, bool>> predicate, string orderBy = "", int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -796,7 +812,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<T>> QueryPageAsync(Expression<Func<T, bool>> predicate, string orderBy = "", int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -810,7 +826,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
IPageList<T> QueryPage(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -824,7 +840,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<T>> QueryPageAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
@@ -843,7 +859,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>值</returns>
|
||||
List<TResult> QueryMuch<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
@@ -861,7 +877,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>值</returns>
|
||||
Task<List<TResult>> QueryMuchAsync<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
@@ -879,7 +895,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>值</returns>
|
||||
TResult QueryMuchFirst<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
@@ -897,7 +913,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>值</returns>
|
||||
Task<TResult> QueryMuchFirstAsync<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
@@ -916,7 +932,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>值</returns>
|
||||
List<TResult> QueryMuch<T1, T2, T3, TResult>(
|
||||
Expression<Func<T1, T2, T3, object[]>> joinExpression,
|
||||
@@ -935,7 +951,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns>值</returns>
|
||||
Task<List<TResult>> QueryMuchAsync<T1, T2, T3, TResult>(
|
||||
Expression<Func<T1, T2, T3, object[]>> joinExpression,
|
||||
@@ -960,7 +976,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="sql"></param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(秒)</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> SqlQueryable(string sql, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user