public KeywordsDto Get(string searchTerm, string sortType, int?page = 1) { int pageSize = 10; return(new KeywordsDto() { Items = keywordRepository.Get(searchTerm ?? "", sortType ?? "", pageSize, page.Value).Select(x => x.ToViewModel <KeywordDto>()), SearchTerm = searchTerm, PageSize = pageSize, SortType = sortType, Page = page.Value, TotalRecordsCount = keywordRepository.Count(searchTerm ?? "") }); }
public IViewComponentResult Invoke(int max) { Keywords = _repoisitory.Get().Take(max).ToList(); return(View(Keywords)); }