Ejemplo n.º 1
0
        public EntitListViewModel <Product> Get(PageInfo pageInfo)
        {
            if (pageInfo == null)
            {
                pageInfo = new PageInfo();
            }

            pageInfo.ItemsCount = _productsManager.GetProductsCount();
            var products = _productsManager.GetAllProducts(pageInfo);

            return(new EntitListViewModel <Product> {
                PageInfo = pageInfo, Entities = products
            });
        }