コード例 #1
0
        public async Task <IActionResult> GetSubCategory(int id)
        {
            if (id != 0)
            {
                List <SubCategory> subCategories = new List <SubCategory>();
                subCategories = await subCategoryService.GetSubCategoryInCategory(id);

                return(Json(new SelectList(subCategories, "Id", "Name")));
            }
            return(NotFound());
        }