Esempio n. 1
0
 /// <summary>
 /// 移除缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableName">表名</param>
 /// <param name="cacheType">缓存的类型</param>
 /// <param name="sql"></param>
 /// <param name="sqlParams">sql的参数</param>
 public static void RemoveUseDict(this IEFQueryCache cache, string tableName, string cacheType, string sql,
                                  IDictionary <string, object> sqlParams)
 {
     cache.Remove(tableName, cacheType,
                  EFHelper.Services.EFCoreExUtility.CombineSqlAndParamsToString(sql, sqlParams));
 }
Esempio n. 2
0
 /// <summary>
 /// 移除缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableEntityType">表的实体类型(用于获取表名)</param>
 /// <param name="cacheType">缓存的类型</param>
 /// <param name="sql"></param>
 /// <param name="sqlParams">sql的参数</param>
 public static void Remove(this IEFQueryCache cache, Type tableEntityType, string cacheType, string sql,
                           ICollection <IDataParameter> sqlParams)
 {
     cache.Remove(EFHelper.Services.EFCoreExUtility.GetTableName(tableEntityType), cacheType,
                  sql, sqlParams);
 }
Esempio n. 3
0
 /// <summary>
 /// 移除缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableName">表名</param>
 /// <param name="cacheType">缓存的类型</param>
 /// <param name="sql"></param>
 /// <param name="sqlParams">sql的参数</param>
 public static void Remove(this IEFQueryCache cache, string tableName, string cacheType, string sql,
                           ICollection <IDataParameter> sqlParams)
 {
     cache.Remove(tableName, cacheType,
                  EFHelper.Services.EFCoreExUtility.CombineSqlAndParamsToString(sql, sqlParams));
 }
Esempio n. 4
0
 /// <summary>
 /// 移除缓存(指定表下的所有缓存)
 /// </summary>
 /// <typeparam name="TEntity">表的实体类型(用于获取表名)</typeparam>
 /// <param name="cache"></param>
 public static void Remove <TEntity>(this IEFQueryCache cache)
 {
     cache.Remove(typeof(TEntity));
 }
Esempio n. 5
0
 /// <summary>
 /// 移除缓存(指定表下的所有缓存)
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableEntityType">表的实体类型(用于获取表名)</param>
 public static void Remove(this IEFQueryCache cache, Type tableEntityType)
 {
     cache.Remove(EFHelper.Services.EFCoreExUtility.GetTableName(tableEntityType));
 }
Esempio n. 6
0
 /// <summary>
 /// 移除缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableEntityType">表的实体类型(用于获取表名)</param>
 /// <param name="cacheType">缓存的类型</param>
 /// <param name="query"></param>
 public static void Remove(this IEFQueryCache cache, Type tableEntityType, string cacheType, IQueryable query)
 {
     cache.Remove(EFHelper.Services.EFCoreExUtility.GetTableName(tableEntityType), cacheType, query);
 }
Esempio n. 7
0
 /// <summary>
 /// 移除缓存(指定表下 指定的缓存类型下 的所有缓存)
 /// </summary>
 /// <typeparam name="TEntity">表的实体类型(用于获取表名)</typeparam>
 /// <param name="cache"></param>
 /// <param name="cacheType">缓存的类型</param>
 public static void Remove <TEntity>(this IEFQueryCache cache, string cacheType)
 {
     cache.Remove(typeof(TEntity), cacheType);
 }
 /// <summary>
 /// 移除指定表下的所有List缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableEntityType">表的实体类型(用于获取表名)</param>
 public static void ListRemove(this IEFQueryCache cache, Type tableEntityType)
 {
     cache.Remove(tableEntityType, _cacheType);
 }
 /// <summary>
 /// 移除指定表下的所有List缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableName">表名</param>
 public static void ListRemove(this IEFQueryCache cache, string tableName)
 {
     cache.Remove(tableName, _cacheType);
 }
 /// <summary>
 /// 移除List缓存
 /// </summary>
 /// <typeparam name="TEntity">表的实体类型(用于获取表名)</typeparam>
 /// <param name="cache"></param>
 /// <param name="cacheKey">缓存的key</param>
 public static void ListRemove <TEntity>(this IEFQueryCache cache, string cacheKey)
 {
     cache.Remove <TEntity>(_cacheType, cacheKey);
 }
 /// <summary>
 /// 移除指定表下的所有List缓存
 /// </summary>
 /// <typeparam name="TEntity">表的实体类型(用于获取表名)</typeparam>
 /// <param name="cache"></param>
 public static void ListRemove <TEntity>(this IEFQueryCache cache)
 {
     cache.Remove <TEntity>(_cacheType);
 }
 /// <summary>
 /// 移除List缓存
 /// </summary>
 /// <typeparam name="TEntity">表的实体类型(用于获取表名)</typeparam>
 /// <param name="cache"></param>
 /// <param name="query"></param>
 public static void ListRemove <TEntity>(this IEFQueryCache cache, IQueryable query)
 {
     cache.Remove <TEntity>(_cacheType, query);
 }
 /// <summary>
 /// 移除Count缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableName">表名</param>
 /// <param name="cacheKey">缓存的key</param>
 public static void CountRemove(this IEFQueryCache cache, string tableName, string cacheKey)
 {
     cache.Remove(tableName, _cacheType, cacheKey);
 }
 /// <summary>
 /// 移除Count缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableEntityType">表的实体类型(用于获取表名)</param>
 /// <param name="query"></param>
 public static void CountRemove(this IEFQueryCache cache, Type tableEntityType, IQueryable query)
 {
     cache.Remove(tableEntityType, _cacheType, query);
 }
Esempio n. 15
0
 /// <summary>
 /// 移除LongCount缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableEntityType">表的实体类型(用于获取表名)</param>
 /// <param name="cacheKey">缓存的key</param>
 public static void LongCountRemove(this IEFQueryCache cache, Type tableEntityType, string cacheKey)
 {
     cache.Remove(tableEntityType, _cacheType, cacheKey);
 }
Esempio n. 16
0
 /// <summary>
 /// 移除LongCount缓存
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="tableName">表名</param>
 /// <param name="query"></param>
 public static void LongCountRemove(this IEFQueryCache cache, string tableName, IQueryable query)
 {
     cache.Remove(tableName, _cacheType, query);
 }