public async Task <TagListVM> GetTagListVM() { var viewModel = new TagListVM { Tags = await context.Tag.ToArrayAsync(), }; return(viewModel); }
public ActionResult Index([Bind(Include = "Page, Sort")] PageSortCriteria pageSortCriteria, [Bind(Include = "Name")] TagSearchCriteria searchCriteria = null) { TagListVM vm = new TagListVM { Tags = UOW.Tags.GetAllPaged(pageSortCriteria, searchCriteria), PageSortCriteria = pageSortCriteria, SearchCriteria = searchCriteria }; return(View(vm)); }