Ejemplo n.º 1
0
 /// <summary>
 /// 根据类型和方法名获取查询结果集
 /// </summary>
 /// <typeparam name="T">类类型</typeparam>
 /// <param name="methodName">方法名</param>
 /// <param name="parameters">方法参数</param>
 /// <param name="key">缓存键</param>
 /// <returns></returns>
 public static object GetServiceQueryDataWithCache <T>(string methodName, object[] parameters, string key)
 {
     if (CacheUtility.Exists(key))
     {
         object returnValue;
         if (CacheUtility.Get(key, out returnValue))
         {
             return(returnValue);
         }
         return(null);
     }
     return(GetServiceQueryData <T>(methodName, parameters));
 }