예제 #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public override IList <Users> LoadAll()
        {
            var functionName = System.Reflection.MethodBase.GetCurrentMethod().Name;
            var key          = className + ":" + functionName;

            //添加关联
            rh.AddJoin("Users", key);
            if (rh.Exist(key) > 0) //存在
            {
                return(rh.GetList <Users>(key) as IList <Users>);
            }
            else
            {
                IList <Users> list = base.LoadAll();
                //写入缓存
                rh.AddList <Users>(key, list);
                return(list);
            }
        }