Ejemplo n.º 1
0
        public async Task Load(ProductCategoriesFilterModel filter)
        {
            _logger.LogDebug("LOAD CATEGORIES!");
            var(r, e) = await _repository.GetFilteredProductCategories(filter);

            _page = r;
            Error = e;
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetAll(ProductCategoriesFilterModel filter)
        {
            var productCategories = await _service.Get(new ProductCategoriesFilter(new PageFilter(filter.Skip, filter.Take, MaxTake), filter.Id, filter.Title, filter.Descending, filter.OrderBy));

            return(Ok(new PageResultModel <ProductCategoryModel>()
            {
                ProductsFilter = productCategories.PageFilter,
                TotalCount = productCategories.TotalCount,
                Value = productCategories.Value.Select(p => new ProductCategoryModel(p)).ToList()
            }));
        }
Ejemplo n.º 3
0
        public Task <(PageResultModel <ProductCategoryModel>, string)> GetFilteredProductCategories(ProductCategoriesFilterModel model)
        {
            var url = GetFullUrl("/productCategories/filter");

            return(_http.PostAsync <PageResultModel <ProductCategoryModel> >(url, model, false));
        }