public ActionResult ListFaqItems(Guid id)
        {
            FaqListing model = new FaqListing();

            model.Faq.FaqCategoryID = id;
            model.Faq.SiteID        = this.SiteID;

            return(ListFaqItems(model));
        }
        public ActionResult ListFaqItems(FaqListing model)
        {
            model.Items.ToggleSort();
            var srt = model.Items.ParseSort();

            List <carrot_FaqItem> lst = null;

            using (FaqHelper fh = new FaqHelper(this.SiteID)) {
                model.Faq = fh.CategoryGetByID(model.Faq.FaqCategoryID);
                lst       = fh.FaqItemListGetByFaqCategoryID(model.Faq.FaqCategoryID);
            }

            IQueryable <carrot_FaqItem> query = lst.AsQueryable();

            query = query.SortByParm <carrot_FaqItem>(srt.SortField, srt.SortDirection);

            model.Items.DataSource = query.Skip(model.Items.PageSize * model.Items.PageNumberZeroIndex).Take(model.Items.PageSize).ToList();

            model.Items.TotalRecords = lst.Count();

            ModelState.Clear();

            return(View(model));
        }