Exemple #1
0
        private string GetCacheSql <T>(SqlCacheKey sqlType)
        {
            string key = GetCacheKey <T>(sqlType);

            if (cache.ContainsKey(key))
            {
                return(cache[key]);
            }

            return(string.Empty);
        }
Exemple #2
0
 private string GetCacheKey <T>(SqlCacheKey sqlType)
 {
     return($"{(short)sqlType}-{typeof(T).FullName}");
 }
Exemple #3
0
        private void SetCacheSql <T>(SqlCacheKey sqlType, string sql)
        {
            string key = GetCacheKey <T>(sqlType);

            cache[key] = sql;
        }