Пример #1
0
        public IEnumerable <Product> Get(int page, int count)
        {
            try
            {
                int?start = null;
                if (page > 0 && count >= 0)
                {
                    start = (page - 1) * count;
                }
                else
                {
                    throw new Exception();
                }

                return(_productManager.GetAll(start, count));
            }
            catch (Exception exc)
            {
                return(null);
            }
        }
Пример #2
0
 public ActionResult Get([FromQuery] ProductFilter filter)
 {
     filter.Status = StatusFilterEnum.Active;
     return(GetStatusCodeResult(_productsManager.GetAll(filter)));
 }