예제 #1
0
 private static IList <T> DoFindObjects <T>(IDbCommand cmd)
     where T : class, IAlbianObject, new()
 {
     try
     {
         IList <T> target = ResultCache.GetCachingObjects <T>(cmd);
         if (null != target)
         {
             return(target);
         }
         target = DoLoadObjects <T>(cmd);
         //ResultCache.CachingObjects(cmd, target);
         return(target);
     }
     catch (Exception exc)
     {
         if (null != Logger)
         {
             Logger.ErrorFormat("Find Object is error..info:{0}.", exc.Message);
         }
         throw exc;
     }
 }
예제 #2
0
 private static IList <T> DoFindObjects <T>(string routingName, int top, IFilterCondition[] where,
                                            IOrderByCondition[] orderby)
     where T : class, IAlbianObject, new()
 {
     try
     {
         IList <T> target = ResultCache.GetCachingObjects <T>(routingName, top, where, orderby);
         if (null != target)
         {
             return(target);
         }
         target = DoLoadObjects <T>(routingName, top, where, orderby);
         //ResultCache.CachingObjects(routingName, top, where, orderby, target);
         return(target);
     }
     catch (Exception exc)
     {
         if (null != Logger)
         {
             Logger.ErrorFormat("Find Object is error..info:{0}.", exc.Message);
         }
         throw exc;
     }
 }