Beispiel #1
0
        public SYSUser GetRidis(string loginName)
        {
            //RedisCache _redisCache = new RedisCache();

            SYSUser userItem = new SYSUser();

            if (_IredisCache.Exist(loginName))
            {
                userItem = _IredisCache.Get <SYSUser>(loginName);
            }
            else
            {
                Task <List <SYSUser> > paramQueryData = _IsysUser.QueryStrAsync(a => a.LoginName == loginName);
                userItem = paramQueryData.Result.FirstOrDefault();
                _IredisCache.Set(loginName, userItem);
            }
            return(userItem);
        }