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