public async Task <ContentRepositoryModel> GetUserContentsAsync(EaUser user, int s, int t)
        {
            var us    = NonTrackingAsyncEnum.Where(c => c.EaUserId == user.Id && c.IsEnable);
            var count = await us.Count();

            var datas = await us.Skip(s).Take(t).ToArray();

            var crm = new ContentRepositoryModel(count, s, t, datas);

            return(crm);
        }
        /// <summary>
        /// 获取内容
        /// </summary>
        /// <param name="gid"></param>
        /// <param name="s"></param>
        /// <param name="t"></param>
        /// <param name="ai"></param>
        /// <returns></returns>
        public async Task <ContentRepositoryModel> GetContentsAsync(uint gid, int s = 0, int t = 6, bool ai = false)//一页6个
        {
            var cs    = NonTrackingAsyncEnum.Where(c => c.ContentGroupId == gid && c.IsEnable);
            var count = await cs.Count();

            var datas = await cs.Skip(s).Take(t).ToArray();

            if (ai)
            {
                await LoadFilesAsync(datas);
            }
            var cpm = new ContentRepositoryModel(count, s, t, datas);

            return(cpm);
        }
        /// <summary>
        /// 搜索内容
        /// </summary>
        /// <param name="ts"></param>
        /// <param name="s"></param>
        /// <param name="t"></param>
        /// <param name="ai"></param>
        /// <returns></returns>
        public async Task <ContentRepositoryModel> SearchContentAsync(string ts, int s, int t, bool ai = false)
        {
            var cs    = NonTrackingAsyncEnum.Where(c => c.Title.Contains(ts) && c.IsEnable);
            var count = await cs.Count();

            var selectcs = await cs.Skip(s).Take(t).ToArray();

            if (ai)
            {
                await LoadFilesAsync(selectcs);
            }
            var cpm = new ContentRepositoryModel(count, s, t, selectcs);

            return(cpm);
            //return Json((await _contentRepository.GetAsync(c => c.Title.Contains(ts)&&c.IsEnable, preCount, preCount * page, autoin)));
        }
        public async Task <ContentRepositoryModel> GetLikeContentAsync(EaUser user, int t, int s)
        {
            var cs = _likeRepository.Where(c => c.EaUserId == user.Id && c.IsEnable)
                     .Skip(s)
                     .Take(t)
                     .Select(c => c.ContentId);               //喜欢的内容页
            var count = await cs.Count();

            var lcs = await cs.ToList();

            var datas = await NonTrackingAsyncEnum.Where(c => lcs.Contains(c.Id) && c.IsEnable).ToArray();

            var cpm = new ContentRepositoryModel(count, s, t, datas);

            return(cpm);
        }