private async Task LoadAsync()
        {
            var input = new PagedProductRequestDto()
            {
                Filter     = Keyword,
                CategoryId = Category?.Id
            };
            var result = await ProductAppService.GetListAsync(input);

            ProductList = result.Items;
        }
Beispiel #2
0
        public async Task <PagedResultDto <ProductListDto> > GetAllSeller(PagedProductRequestDto input)
        {
            Domain.Seller.Seller seller = await GetCurrentSeller();

            IQueryable <Product.Product> result = await ProductManager.GetAllForSeller(seller.Id, input.Keyword);

            IQueryable <ProductListDto> mapped = result.Select(s => new ProductListDto
            {
                Id            = s.Id,
                CoverImageUrl = s.CoverImage.Image.Url,
                Name          = s.Name,
                Price         = s.Price,
                CreateDate    = s.CreationTime
            });

            return(await GetPagedResult(mapped, input));
        }