예제 #1
0
        public async Task <TagListVM> GetTagListVM()
        {
            var viewModel = new TagListVM
            {
                Tags = await context.Tag.ToArrayAsync(),
            };

            return(viewModel);
        }
예제 #2
0
        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));
        }