Пример #1
0
        private IEnumerable <ChapterView> GetChapterList(out int rowCount, int novelId, int contentType)
        {
            int    pageIndex = 1;
            int    pageSize  = 2;
            string columns   = " Id ,NovelId,VolumeName,ChapterName,ChapterCode,OnlineTime,WordSize";

            string where = " and NovelId = @NovelId and status = 1 and OnlineTime < @OnlineTime ";
            string orderBy = "order by chaptercode asc, id asc";

            object param = new
            {
                NovelId    = novelId,
                OnlineTime = DateTime.Now
            };

            if (contentType == (int)Constants.Novel.ContentType.漫画)
            {
                pageSize = 10;
            }

            return(_chapterService.GetPagerList(columns, where, orderBy, out rowCount, pageIndex, pageSize, param));
        }