Beispiel #1
0
        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));
        }
Beispiel #2
0
 public JsonResult GetStateById(int ID)
 {
     return(Json((_subCategoryService.GetByCategoryId(ID))));
 }
Beispiel #3
0
 public async Task <IEnumerable <SubCategoryViewModel> > Get(int categoryId)
 {
     return(await service.GetByCategoryId(categoryId));
 }