コード例 #1
0
        private static SearchDetailItemView GetFromCachePipeline(int userId)
        {
            SearchDetailItemView r = new SearchDetailItemView();

            if (HttpContext.Current.Cache[userId.ToString()] == null || (HttpContext.Current.Cache[userId.ToString()].GetType().ToString() != "Dating.Repository.DatingUser"))
            {
            }
            else
            {
                r = (SearchDetailItemView)HttpContext.Current.Cache[userId.ToString()];
            }

            return(r);
        }
コード例 #2
0
        public static SearchDetailItemView Get(int userId)
        {
            UserProperties p;

            if (HttpContext.Current.Cache[userId.ToString()] == null)
            {
                p = new UserProperties();
                //p.Get();
                p.InsertIntoCache();
            }
            else
            {
                p = (UserProperties)HttpContext.Current.Cache[userId.ToString()];
            }

            SearchDetailItemView r = new SearchDetailItemView();

            //r.City=p.ci
            r.Username = p.Username;


            return(r);
        }