示例#1
0
        public async Task <IActionResult> GetCategories()
        {
            var apiMsg = await ApiMessage.Wrap(async() =>
            {
                return(await contentBusiness.GetTopCategory(string.Empty));
            });

            return(Json(apiMsg));
        }
示例#2
0
        public async Task OnGet(Guid?cid)
        {
            if (cid != null)
            {
                var categoryResult = await contentBusiness.GetCategoryWithDetailById(cid.Value);

                Categories       = categoryResult.Category;
                CategoryComments = categoryResult.CategoryComments;
            }
            else
            {
                await contentBusiness.GetTopCategory("");
            }
        }
示例#3
0
        public async Task OnGet(string query, int skipCount = 0, int pageSize = 20)
        {
            var result = await contentBusiness.GetTopCategory("");

            CategoryList = result.ToList();
        }