示例#1
0
        public void GetPeriodSortingInfoSqlToRedisTest()
        {
            List <AAGetModel> peroidLists = SqlDal.GetPeriodAAModelList();

            if (peroidLists.Any())
            {
                Redishelper.PushList <AAGetModel>("SortingList", peroidLists);
            }
        }
        public void RedisToApi()
        {
            Redishelper.Delete("SortingList");
            var peroidLists = SqlDal.GetPeriodAAModelList();

            if (peroidLists.Count <= 0)
            {
                return;
            }
            Redishelper.PushList <AAGetModel>("SortingList", peroidLists);
            var peroidListsPop = Redishelper.PopList <AAGetModel>("SortingList", Convert.ToInt16(ConfigurationManager.AppSettings["OncRedisPopNumber"]));
            var a = peroidListsPop.First();

            Assert.IsNotNull(a.BillNumber);
        }