Пример #1
0
        public async Task <IActionResult> List(int id = 0)
        {
            if (id != 0)
            {
                Result <List <CategoryDO> > result = _categoryBL.GetSubCategoriesById(id);
                result.Html = await PartialView("_List", result).ToString(ControllerContext);

                return(Json(result));
            }
            else
            {
                Result <List <CategoryDO> > result = _categoryBL.GetAll();
                result.Html = await PartialView("_List", result).ToString(ControllerContext);

                return(Json(result));
            }
        }