public List <UserInfo> FindUserInfos(UserInfoCriteria criteria = null)
        {
            List <UserInfo> userInfoList = null;
            string          cacheKey     = criteria == null ? "UserInfoCriteria_null" : criteria.GetCacheKey();

            if (!TryGetCacheData(cacheKey, out userInfoList, _cacheName))
            {
                userInfoList = GetUserInfoManager().FindUserInfos(criteria);
                SetCacheData(_cacheName, cacheKey, userInfoList);
            }
            return(userInfoList);
        }
Example #2
0
        /// <summary>
        /// Find data in database
        /// </summary>
        /// <returns></returns>
        public List <UserInfo> Find(UserInfoCriteria userInfoCriteria = null)
        {
            List <UserInfo>          resultList = null;
            TableQuery <UserInfoRow> rowList    = _dbContext.Table <UserInfoRow>();

            CriteriaTransformer.CompleteQuery(ref rowList, userInfoCriteria);

            if (rowList != null && rowList.Count() > 0)
            {
                resultList = new List <UserInfo>();
                foreach (var userInfoRow in rowList)
                {
                    resultList.Add(UserInfoTransformer.ToBean(userInfoRow));
                }
            }
            return(resultList);
        }
Example #3
0
 public List <UserInfo> FindUserInfos(UserInfoCriteria userInfoCriteria = null)
 {
     return(_userInfoModule.Find(userInfoCriteria));
 }