public object GetArticleLists([FromUri] ArticleQuery query)
        {
            if (query == null)
            {
                query = new ArticleQuery();
            }
            PageVM <ArticleVM> pageVm = new ArticleService().GetArticlePageList(query);

            if (pageVm == null)
            {
                return(new
                {
                    Code = -200,
                    Msg = "暂时数据",
                    Data = ""
                });
            }

            return(new
            {
                Code = 200,
                Msg = "获取成功",
                Data = pageVm
            });
        }
Example #2
0
        private void BindData(int articletype, int pageno, string title)
        {
            ArticleQuery articleQuery = new ArticleQuery();

            articleQuery.Title       = title;
            articleQuery.ArticleType = articletype;
            if (articletype == 1)
            {
                articleQuery.ArticleType = 0;
                articleQuery.IsShare     = 1;
            }
            articleQuery.SortBy    = "PubTime";
            articleQuery.SortOrder = SortAction.Desc;
            Globals.EntityCoding(articleQuery, true);
            articleQuery.PageIndex = pageno;
            articleQuery.PageSize  = this.pager.PageSize;
            DbQueryResult articleRequest = ArticleHelper.GetArticleRequest(articleQuery);

            this.rptList.DataSource = articleRequest.Data;
            this.rptList.DataBind();
            int totalRecords = articleRequest.TotalRecords;

            this.pager.TotalRecords = totalRecords;
            this.recordcount        = totalRecords;
            if (this.pager.TotalRecords <= this.pager.PageSize)
            {
                this.pager.Visible = false;
            }
        }
Example #3
0
        private void BindData(int articletype, int pageno, string title)
        {
            ArticleQuery entity = new ArticleQuery
            {
                Title       = title,
                ArticleType = articletype,
                SortBy      = "PubTime",
                SortOrder   = SortAction.Desc
            };

            Globals.EntityCoding(entity, true);
            entity.PageIndex = pageno;
            entity.PageSize  = this.pager.PageSize;
            DbQueryResult articleRequest = ArticleHelper.GetArticleRequest(entity);

            this.rptList.DataSource = articleRequest.Data;
            this.rptList.DataBind();
            int totalRecords = articleRequest.TotalRecords;

            this.pager.TotalRecords = totalRecords;
            this.recordcount        = totalRecords;
            if (this.pager.TotalRecords <= this.pager.PageSize)
            {
                this.pager.Visible = false;
            }
        }
Example #4
0
        private void GetList(HttpContext context)
        {
            int num  = 1;
            int num2 = 10;

            num = base.GetIntParam(context, "page", false).Value;
            if (num < 1)
            {
                num = 1;
            }
            num2 = base.GetIntParam(context, "rows", false).Value;
            if (num2 < 1)
            {
                num2 = 10;
            }
            ArticleQuery articleQuery = new ArticleQuery();

            articleQuery.Keywords = context.Request["Keywords"];
            if (!string.IsNullOrEmpty(context.Request["CategoryId"]))
            {
                articleQuery.CategoryId = base.GetIntParam(context, "CategoryId", false).Value;
            }
            articleQuery.StartArticleTime = base.GetDateTimeParam(context, "FromDate");
            articleQuery.EndArticleTime   = base.GetDateTimeParam(context, "ToDate");
            articleQuery.SortOrder        = SortAction.Desc;
            articleQuery.PageIndex        = num;
            articleQuery.PageSize         = num2;
            DataGridViewModel <Dictionary <string, object> > dataList = this.GetDataList(articleQuery);
            string s = base.SerializeObjectToJson(dataList);

            context.Response.Write(s);
            context.Response.End();
        }
Example #5
0
        public void BindingData()
        {
            bool           enableCache = (CDHelper.Config.EnableCache == "true");
            List <Article> result      = null;

            string       type  = StateMgr.ConvertEnumToStr(EnumLibrary.ArticleType.Article);
            ArticleQuery query = new ArticleQuery();

            query.AccountID = AccountID;
            query.EnumState = type;
            query.OrderKeys = "ID";
            List <Article> articleList = ArticleHelper.QueryArtilcesByAll(query, 0, 5, null);

            if (articleList != null)
            {
                foreach (Article article in articleList)
                {
                    if (article.Title.Length > 25)
                    {
                        article.Title = article.Title.Substring(0, 25) + "...";
                    }
                }
            }
            result = articleList;

            DataGridView.DataSource = result;
            DataGridView.DataBind();
        }
Example #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ArticleQuery query = new ArticleQuery();

        query.SortOrder      = SortOrder.Descending;
        query.ArticleOrderBy = ArticleOrderBy.CreateTime;

        List <Article> articles = ArticleManager.GetArticles(query).Records;

        HttpContext   context = HttpContext.Current;
        XmlTextWriter writer  = new XmlTextWriter(context.Response.OutputStream, System.Text.Encoding.UTF8);

        WriteRSSPrologue(writer);
        WriteRSSHeadChennel(writer);

        foreach (Article article in articles)
        {
            AddRSSItem(
                writer,
                article.CreateTime.ToUniversalTime().ToString("r"),
                article.Title,
                "view.aspx?news-newsdetail&id=" + HHOnline.Framework.GlobalSettings.Encrypt(article.ID.ToString()),
                article.Content);
        }

        writer.Flush();
        writer.Close();

        context.Response.ContentEncoding = System.Text.Encoding.UTF8;
        context.Response.ContentType     = "text/xml";
        context.Response.Cache.SetCacheability(HttpCacheability.Public);
        context.Response.End();
    }
Example #7
0
        public ActionResult GetArticlePageList(ArticleQuery query)
        {
            if (query == null)
            {
                query = new ArticleQuery();
            }

            if (!query.PageIndex.HasValue)
            {
                query.PageIndex = 1;
            }
            if (!query.PageSize.HasValue)
            {
                query.PageSize = 8;
            }

            PageVM <ArticleVM> list = new ArticleService().GetArticlePageList(query);

            if (list == null || list.Data == null || list.Data.Count == 0)
            {
                return(Json(new
                {
                    Code = -200,
                    Msg = "暂无数据"
                }));
            }

            return(Json(new
            {
                Code = 200,
                Msg = "获取成功",
                Data = list
            }));
        }
Example #8
0
        void LoadArticles()
        {
            ArticleQuery query = new ArticleQuery();

            query.State = ArticleStates.Checking;
            List <Article> articles = ArticleHelper.QueryArtilcesByAll(query);

            if (articles != null)
            {
                Pager.RecorderCount = articles.Count;
            }
            else
            {
                Pager.RecorderCount = 0;
            }
            if (Pager.Count < 0)
            {
                Pager.PageIndex = 0;
            }
            Pager.FreshMyself();
            if (Pager.Count <= 0)
            {
                DataGridView.DataSource = null;
                DataGridView.DataBind();
                return;
            }

            DataGridView.DataSource = articles.GetRange(Pager.Begin, Pager.Count);
            DataGridView.DataBind();
        }
Example #9
0
        List <Article> QueryArticles()
        {
            //return CacheRecord.Create("article").GetInstance<List<Article>>(CreateCacheKey("ArticleDataProvider$QueryArticles$"), delegate()
            //{
            List <Article> list  = null;
            ArticleQuery   query = CreateArticleQuery();

            if (PageSize <= 0)
            {
                list = ArticleHelper.QueryArtilcesByAll(query, 0, RecordCount, null);
            }
            else
            {
                if (AllowPager)
                {
                    list = ArticleHelper.QueryArtilcesByAll(query, StartItem, PageItemsCount, null);
                }
                else
                {
                    if (RecordCount > PageSize)
                    {
                        list = ArticleHelper.QueryArtilcesByAll(query, 0, PageSize, null);
                    }
                    else
                    {
                        list = ArticleHelper.QueryArtilcesByAll(query, 0, RecordCount, null);
                    }
                }
            }
            FormatArticlesData(list);
            return(list);
            //});
        }
Example #10
0
    protected void Button45_Click(object sender, EventArgs e)
    {
        ArticleQuery query = new ArticleQuery();

        query.Title = "化工";
        SearchResultDataSet <Article> articles = HHOnline.SearchBarrel.NewsSearchManager.Search(query);
    }
Example #11
0
        public DbQueryResult GetArticleRequest(ArticleQuery query)
        {
            StringBuilder builder = new StringBuilder();

            if (query.ArticleType > 0)
            {
                builder.AppendFormat(" ArticleType = {0} ", query.ArticleType);
            }
            if (query.IsShare >= 0)
            {
                if (builder.Length > 0)
                {
                    builder.Append(" AND ");
                }
                builder.AppendFormat(" IsShare = {0} ", query.IsShare);
            }
            if (!string.IsNullOrEmpty(query.Title))
            {
                if (builder.Length > 0)
                {
                    builder.Append(" AND ");
                }
                builder.AppendFormat("( Title LIKE '%{0}%' or Memo like '%{0}%' or exists (select 1 from  vshop_ArticleItems where title like '%{0}%' and ArticleId=vshop_Article.ArticleId))", DataHelper.CleanSearchString(query.Title));
            }
            return(DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vshop_Article ", "ArticleId", (builder.Length > 0) ? builder.ToString() : null, "*"));
        }
Example #12
0
        void BindListByKeyword()
        {
            string       KeyWord   = KeyTextBox.Text;
            DateTime     BeginDate = DateTime.MinValue;
            DateTime     EndDate   = DateTime.MaxValue;
            ArticleQuery q         = new ArticleQuery();

            q.KeyWord   = KeyWord;
            q.BeginDate = BeginDate;
            q.EndDate   = EndDate;

            ArticlePager.PageSize      = PageSize;
            ArticlePager.RecorderCount = ArticleHelper.QueryArtilceCountByAll(q);

            if (PageSize > 0)
            {
                PagerDiv.Visible = (ArticlePager.RecorderCount <= PageSize) ? false : true;
            }

            List <Article> list = ArticleHelper.QueryArtilcesByAll(q, ArticlePager.Begin, ArticlePager.Count, null);

            DetailGridView.DataSource = list;
            DetailGridView.DataBind();
            MessageLabel.Text = "查询关键字“" + KeyTextBox.Text + "”的结果:";
        }
Example #13
0
        /// <summary>
        /// 获取通知列表
        /// </summary>
        /// <returns></returns>
        public PageVM <ArticleVM> GetArticlePageList(ArticleQuery query)
        {
            if (!query.PageIndex.HasValue)
            {
                query.PageIndex = 1;
            }
            if (!query.PageSize.HasValue)
            {
                query.PageSize = 8;
            }

            string sql = "select * from article n where 1=1 ";

            if (!string.IsNullOrEmpty(query.KeyWord))
            {
                sql += string.Format(" and n.title like '%{0}%' ", query.KeyWord);
            }

            if (query.StartTime.HasValue)
            {
                sql += string.Format(" and date(n.UpdateTime) >= '{0}' ", query.StartTime);
            }

            if (query.EndTime.HasValue)
            {
                sql += string.Format(" and date(n.UpdateTime) <= '{0}' ", query.EndTime);
            }

            sql += " order by n.UpdateTime DESC,n.ID DESC ";
            string pageSql = string.Format(" Limit {0},{1}", (query.PageIndex - 1) * query.PageSize, query.PageSize);

            using (var dbContext = new DbContext().ConnectionStringName(ConnectionUtil.connFluentData, new MySqlProvider()))
            {
                //获取指定页数据
                List <ArticleVM> list = dbContext.Sql(sql + pageSql).QueryMany <ArticleVM>((ArticleVM art, IDataReader reader) =>
                {
                    art.ID            = reader.GetInt32("ID");
                    art.Title         = reader.GetString("Title");
                    art.Content       = reader.GetString("Content");
                    art.Inputer       = reader.GetString("Inputer");
                    art.InputTime     = reader.GetDateTime("InputTime");
                    art.UpdateTime    = reader.GetDateTime("UpdateTime");
                    art.UpdateTimeStr = reader.GetDateTime("UpdateTime").ToString("yyyy-MM-dd");
                });

                //获取数据总数
                int totalCount = dbContext.Sql(sql).QueryMany <int>().Count;
                //总页数
                double totalPages = ((double)totalCount / query.PageSize.Value);

                PageVM <ArticleVM> pageVM = new PageVM <ArticleVM>();
                pageVM.Data       = list;
                pageVM.TotalCount = totalCount;
                pageVM.TotalPages = (int)Math.Ceiling(totalPages);
                pageVM.PageIndex  = query.PageIndex;

                return(pageVM);
            }
        }
Example #14
0
        public static ParaEntityList <Article> getArticles()
        {
            var articleQuery = new ArticleQuery();

            articleQuery.RetrieveAllRecords = true;

            return(Service.GetList <Article>(articleQuery));
        }
Example #15
0
        public IEnumerable <Article> GetArticles(ArticleQuery query)
        {
            _logger.LogDebug($"Fetching articles for params {query}");

            var filteredArticles = ApplyFilters(query);

            return(filteredArticles.ToList());
        }
Example #16
0
 public IEnumerable <Article> GetArticles(ArticleQuery query)
 {
     if (query == null)
     {
         query = new ArticleQuery();
     }
     return(_catalogService.GetArticles(query));
 }
Example #17
0
        protected override void AttachChildControls()
        {
            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.txtCategoryName = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtCategoryName");
            this.txtCategoryId   = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtCategoryId");
            this.keyWord         = this.Page.Request.QueryString["keyWord"];
            if (!string.IsNullOrWhiteSpace(this.keyWord))
            {
                this.keyWord = this.keyWord.Trim();
            }
            this.rptArticles   = (VshopTemplatedRepeater)this.FindControl("rptArticles");
            this.txtTotalPages = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            ArticleQuery articleQuery = new ArticleQuery();

            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["CategoryId"]))
            {
                int value = 0;
                if (int.TryParse(this.Page.Request.QueryString["CategoryId"], out value))
                {
                    ArticleCategoryInfo articleCategory = CommentBrowser.GetArticleCategory(value);
                    if (articleCategory != null)
                    {
                        PageTitle.AddSiteNameTitle(articleCategory.Name);
                        articleQuery.CategoryId    = new int?(value);
                        this.txtCategoryId.Value   = value.ToString();
                        this.txtCategoryName.Value = articleCategory.Name;
                    }
                    else
                    {
                        PageTitle.AddSiteNameTitle("文章分类搜索页");
                    }
                }
            }
            articleQuery.Keywords  = this.keyWord;
            articleQuery.PageIndex = pageIndex;
            articleQuery.PageSize  = pageSize;
            articleQuery.SortBy    = "AddedDate";
            articleQuery.SortOrder = SortAction.Desc;
            DbQueryResult articleList = CommentBrowser.GetArticleList(articleQuery);

            this.rptArticles.DataSource = articleList.Data;
            this.rptArticles.DataBind();
            int totalRecords = articleList.TotalRecords;

            this.txtTotalPages.SetWhenIsNotNull(totalRecords.ToString());
        }
Example #18
0
        public static ParaEntityList <Article> getPublishedArticles()
        {
            var articleQuery = new ArticleQuery();

            articleQuery.AddStaticFieldFilter(ArticleQuery.ArticleStaticFields.Published, ParaEnums.QueryCriteria.Equal, true);
            articleQuery.RetrieveAllRecords = true;

            return(Service.GetList <Article>(articleQuery));
        }
Example #19
0
        public static int getArticleCount()
        {
            var articleQuery = new ArticleQuery();

            articleQuery.RetrieveAllRecords = true;
            articleQuery.TotalOnly          = true;

            return(Service.GetList <Article>(articleQuery).TotalItems);
        }
Example #20
0
        public static ParaEntityList <Article> getArticlesByFolder(long folderID)
        {
            var articleQuery = new ArticleQuery();

            articleQuery.AddStaticFieldFilter(ArticleQuery.ArticleStaticFields.Folders, ParaEnums.QueryCriteria.Equal, folderID.ToString());
            articleQuery.RetrieveAllRecords = true;

            return(Service.GetList <Article>(articleQuery));
        }
Example #21
0
        /// <summary>
        /// 取得数据列表
        /// </summary>
        /// <returns>文章列表</returns>
        List <Article> GetArticleListFromDB()
        {
            ArticleQuery   query = new ArticleQuery();
            List <Article> list  = new List <Article>();

            if (String.IsNullOrEmpty(Tag))
            {
                query.ChannelID = BindColumnID;
            }
            else
            {
                query.Tag = Tag;
            }
            Channel ch = ChannelHelper.GetChannel(query.ChannelID, new string[] { "FullFolderPath", "FullUrl" });

            query.ChannelFullUrl = ch != null ? ch.FullUrl : "";
            query.IncludeAllSons = ShowSubArticle;
            query.EnumState      = "";
            query.ModelName      = ModelName;
            query.UseModel       = UseModel;

            query.State      = ArticleStates.Started;
            query.IsShowHome = ShowAtHome ? "1" : "";
            query.IsImage    = IsImage ? "1" : "";

            if (!String.IsNullOrEmpty(OrderFields))
            {
                query.OrderKeys = OrderFields;
            }
            else
            {
                query.OrderKeys = "Updated|Desc";
            }

            query.Overdue = false;
            if (!String.IsNullOrEmpty(KeyWord))
            {
                query.KeyWord = KeyWord;
            }

            RecordCount = ArticleHelper.QueryArtilceModelCountByAll(query);
            if (PageSize > 0)
            {
                list = ArticleHelper.QueryArtilceModelByAll(query, StartItem, PageItemsCount, null);
            }
            else
            {
                list = ArticleHelper.QueryArtilceModelByAll(query, 0, RecordCount, null);
            }

            foreach (Article a in list)
            {
                FormatArticle(a);
            }
            return(list);
        }
Example #22
0
        protected override void Initialize()
        {
            ArticleQuery query = new ArticleQuery();

            query.ChannelID = ColumnID;
            List <Article> data = ArticleHelper.QueryArtilcesByAll(query, 0, 100, null);

            DetailGridView.DataSource = data;
            DetailGridView.DataBind();
            BuildRows();
        }
Example #23
0
        /// <summary>
        /// 根据查询获取文章信息集合
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public static PagingDataSet <Article> GetArticles(ArticleQuery query)
        {
            int                     totalRecods;
            List <Article>          articleList = ArticleProvider.Instance.GetArticles(query, out totalRecods);
            PagingDataSet <Article> articles    = new PagingDataSet <Article>();

            articles.Records      = articleList;
            articles.TotalRecords = totalRecods;

            return(articles);
        }
Example #24
0
        public async Task <ListResult <ArticleDto> > QueryListAsync(ArticleQuery query)
        {
            var result = await _articleStorage.QueryListAsync(query);

            return(new ListResult <ArticleDto>(result)
            {
                Items = Mapper.Map <Article, ArticleDto>(result.Items, (from, to) =>
                {
                    to.Contnet = Mapper.Map <Content, ContentDto>(from.Content);
                })
            });
        }
Example #25
0
        public void BindingData()
        {
            ArticleQuery query = new ArticleQuery();

            query.State = ArticleStates.Checking;
            List <Article> GetAllArticles = null;

            //List<Article> GetAllArticles = ArticleHelper.QueryArticlesByAll(query);
            if (GetAllArticles == null)
            {
                return;
            }
        }
Example #26
0
        void LoadArticles()
        {
            //取出所有待审批文章,逐一判断是否具有权限
            ArticleQuery query = new ArticleQuery();

            query.State = ArticleStates.Checking;
            List <Article> GetAllArticles = ArticleHelper.QueryArtilcesByAll(query);
            List <Article> articles       = new List <Article>();

            foreach (Article article in GetAllArticles)
            {
                try
                {
                    string curLayerNOText = ProcessHelper.GetCurLayerNOText(article.ID);
                    if (curLayerNOText != "") //文章当前审批进程:类似 Channel.FirstAudit
                    {
                        string        channelID = ArticleHelper.GetArticle(article.ID).OwnerID;
                        List <string> contents  = AccountHelper.GetPermissionContents(AccountID, channelID);
                        if (contents.Contains(curLayerNOText))
                        {
                            articles.Add(article);
                        }
                    }
                }
                catch
                { }
            }

            if (articles != null)
            {
                Pager.RecorderCount = articles.Count;
            }
            else
            {
                Pager.RecorderCount = 0;
            }
            if (Pager.Count < 0)
            {
                Pager.PageIndex = 0;
            }
            Pager.FreshMyself();
            if (Pager.Count <= 0)
            {
                DataGridView.DataSource = null;
                DataGridView.DataBind();
                return;
            }

            DataGridView.DataSource = articles.GetRange(Pager.Begin, Pager.Count);
            DataGridView.DataBind();
        }
        /*------------------------------- 方法 ------------------------------------*/

        #region 最热查询
        /// <summary>
        /// 最热查询
        /// </summary>
        /// <returns></returns>
        private ArticleQuery CreateHotQuery()
        {
            if (articleHotQuery == null)
            {
                articleHotQuery = new ArticleQuery();

                articleHotQuery.State = ArticleStates.Started;
                articleHotQuery.OrderKeys = "Clicks|Desc,Updated|Desc,ID|Asc";
                articleHotQuery.Overdue = true;
                if (!string.IsNullOrEmpty(Tag))
                    articleHotQuery.Tag = Tag;
            }
            return articleHotQuery;
        }
Example #28
0
 public MockDataSource(ArticleQuery query)
     : base(query)
 {
     _articles = new List <Article>()
     {
         new Article()
         {
             Id = 1, Key = "SK_SKOD_ZAHTEVEK", Content = "Таблица с убытками"
         },
         new Article()
         {
             Id = 2, Key = "SK_SKOD_SPIS", Content = "Таблица с выплатными делами"
         }
     };
 }
Example #29
0
        public async Task <JsonResult> GetDatas([FromBody] ArticleQuery query)
        {
            var list = await _articleAppService.GetAll(new GetAllArticleDto
            {
                UserName       = query.UserName,
                CategoryId     = query.CategoryId,
                Title          = query.Title,
                SkipCount      = query.Start,
                MaxResultCount = query.Length,
                Sorting        = $"{query.OrderBy},{query.OrderDir}"
            });

            return(Json(new DataTableResultModel <ArticleDto>(query.Draw, list.TotalCount, list.TotalCount,
                                                              list.Items)));
        }
Example #30
0
        public async Task <ArticleListModel> GetListModel(ArticleQuery query)
        {
            ArticleListModel     listModel = new ArticleListModel();
            IQueryable <Article> queryable = GetIncludes(p => p.AuthorUser, x => x.ArticleTags, p => p.ArticleFavorites); //Article Yapan User ve Taglar Gelsin

            if (!string.IsNullOrWhiteSpace(query.TagId))
            {
                var isTag = await _tagServices.Get(p => p.TagId == query.TagId);

                if (isTag != null)
                {
                    queryable = queryable.Where(p => p.ArticleTags.Select(x => x.TagId).Contains(isTag.TagId));
                }
            }

            if (query.UserId > 0)
            {
                var isUser = await _userServices.Get(p => p.Id == query.UserId);

                if (isUser != null)
                {
                    //Eğer Like yaptıklarını istiyorsak...
                    if (query.OnlyLiked)
                    {
                        queryable = queryable.Where(p => p.ArticleFavorites.Any(x => x.UserId == isUser.Id));
                    }
                    else
                    {
                        queryable = queryable.Where(p => p.AuthorUserId == isUser.Id);
                    }
                }
            }


            //.Select(p => new ArticleViewModel {Id=p.Id, AuthorUser = p.AuthorUser, AuthorUserId = p.AuthorUserId, Body = p.Body, CreatedAt = p.CreatedAt, Description = p.Description, Slug = p.Slug, Title = p.Title, UpdatedAt = p.UpdatedAt, Tags = p.ArticleTags.Select(x => x.TagId).ToList() })
            var articleList = queryable.OrderByDescending(p => p.UpdatedAt).Skip(query.Offset * query.Limit).Take(query.Limit).ToList();


            await Task.Run(() => listModel.Articles = _mapper.Map <List <Article>, List <ArticleViewModel> >(articleList));

            //listModel.Articles.ForEach(p =>
            //{
            //    p.Tags = articleList.FirstOrDefault(x => x.Id == p.Id).ArticleTags.Select(x => x.TagId).ToList();
            //});
            listModel.TotalCount = queryable.Count();

            return(listModel);
        }
 public Results SearchArticles(ArticleQuery articleQuery)
 {
     return _searcher.Search(articleQuery);
 }