Пример #1
0
        public ProductsReponse Get(Category.CategoryType category)
        {
            var productsBll = Bll.Products.CreateInstance();

            productsBll.GetData(category, out IQueryable <Product> datos, out int hiddenProducts, out int shownProducts);

            var productsReponse = new ProductsReponse(category.ToString(), shownProducts, hiddenProducts, datos.ToList());

            return(productsReponse);
        }
Пример #2
0
        public ActionResult <IEnumerable <ProductsReponse> > GetProdutcs()
        {
            var productsResponse = new ProductsReponse(_repository.GetProducts());

            return(Ok(productsResponse));
        }