public async Task <DataCollection <ProductDto> > GetAll(int page = 1, int take = 10, string ids = null) { IEnumerable <int> products = null; if (!string.IsNullOrEmpty(ids)) { products = ids.Split(',').Select(x => Convert.ToInt32(x)); } return(await _productQueryService.GetAllAsync(page, take, products)); }
public async Task <DataCollection <ProductDto> > GetAll(int page = 1, int take = 10) { return(await _productQuery.GetAllAsync(page, take)); }
public async Task <IActionResult> GetAll(int page = 1, int pageSize = 10) => Ok(await _productQueryService.GetAllAsync(page, pageSize));