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); } }
public ActionResult Get([FromQuery] ProductFilter filter) { filter.Status = StatusFilterEnum.Active; return(GetStatusCodeResult(_productsManager.GetAll(filter))); }