public async Task <IActionResult> GetByCategoryId(Guid id, [FromQuery] UserParamsModel userParams) { var categories = await _service.GetByCategoryId(id, userParams); Response.AddPaginationHeader(categories.CurrentPage, userParams.PageSize, categories.TotalItems, categories.TotalPage); return(Ok(categories)); }
public JsonResult GetStateById(int ID) { return(Json((_subCategoryService.GetByCategoryId(ID)))); }
public async Task <IEnumerable <SubCategoryViewModel> > Get(int categoryId) { return(await service.GetByCategoryId(categoryId)); }