コード例 #1
0
        /// <summary>
        /// 得到网站访问量
        /// </summary>
        /// <returns></returns>
        public int GetPageViewsCount()
        {
            using (var factory = new BaseAccess())
            {
                try
                {
                    var spec = Specification <HitRecordEntity> .Create(c => c.C_HIT_TYPE == "2");//网站访问量

                    int hitrecord = factory.GetCount <HitRecordEntity>(spec);

                    return(hitrecord);
                }
                catch
                {
                    return(0);
                }
            }
        }