Example #1
0
        public async Task <IActionResult> GetPaggingProduct(string languageId, [FromQuery] GetPublicProductPagingRequest request)
        {
            var product = await _publicProductService.GetAllByCategoryId(languageId, request);

            if (product == null)
            {
                return(BadRequest());
            }
            return(Ok(product));
        }
        public async Task <IActionResult> GetAllPaging(string languageId, [FromQuery] GetPublicProductPagingRequest request)
        {
            var products = await _publicProductService.GetAllByCategoryId(languageId, request);

            return(Ok(products));
        }
Example #3
0
        [HttpGet("{languageId}")]                                                                                             //http://5001/api/product/public-pagging
        public async Task <IActionResult> GetAllPagging(string languageId, [FromQuery] GetPublicProductPaginhRequest request) //[FromQuery] tất cả tham số đều lấy từ query ra
        {
            var products = await _publicProductService.GetAllByCategoryId(languageId, request);

            return(Ok(products));
        }
Example #4
0
        public async Task <IActionResult> GetAllPaging(string languageId, [FromQuery] GetPublicProductPagingRequest request)
        {//FROMQUERY là tất cá các tham số Get...PagingRequest là nó lấy từ query ra
            var products = await _publicProductService.GetAllByCategoryId(languageId, request);

            return(Ok(products));
        }
 public async Task<IActionResult> Get([FromQuery] GetPublicProductPagingRequest request)
 {
     var products = await _publicProductService.GetAllByCategoryId(request);
     return Ok(products);
 }