public IActionResult List() { var tags = this.tagRepository.GetAll(); var viewModel = new ListTagsViewModel(tags); return(View(viewModel)); }
public ActionResult Index(int?p, string search) { var pageIndex = p ?? 1; using (UnitOfWorkManager.NewUnitOfWork()) { var allTags = string.IsNullOrEmpty(search) ? _topicTagService.GetPagedGroupedTags(pageIndex, AppConstants.AdminListPageSize) : _topicTagService.SearchPagedGroupedTags(search, pageIndex, AppConstants.AdminListPageSize); var memberListModel = new ListTagsViewModel { Tags = allTags, PageIndex = pageIndex, TotalCount = allTags.TotalCount, Search = search }; return(View(memberListModel)); } }
public async Task <ActionResult> Index(int?p, string search) { var pageIndex = p ?? 1; var allTags = string.IsNullOrWhiteSpace(search) ? await _topicTagService.GetPagedGroupedTags(pageIndex, SiteConstants.Instance.AdminListPageSize) : await _topicTagService.SearchPagedGroupedTags(search, pageIndex, SiteConstants.Instance.AdminListPageSize); var memberListModel = new ListTagsViewModel { Tags = allTags, PageIndex = pageIndex, TotalCount = allTags.TotalCount, Search = search }; return(View(memberListModel)); }