示例#1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var result = await _commonService.GetCategoryHomeAsync();

            if (result.Code != HttpStatusCode.OK)
            {
                return(View("Default", new List <CategoriesDto>()));
            }
            return(View("Default", result.ResultObj));
        }
示例#2
0
        public async Task <IActionResult> Index()
        {
            var result = await _apiService.GetCategoryHomeAsync();

            return(View(result.ResultObj));
        }