Пример #1
0
        public IHttpActionResult GetByPage(short category, int page,
                                           [ModelBinder(typeof(HttpFilterBinder))] Expression <Func <Good, bool> > pr)
        {
            Task.Delay(1500).GetAwaiter().GetResult();
            try
            {
                var data = _goodService.GetByPage <dynamic>(page, _totalPerPage, category,
                                                            GetCurrentCurrency(), GetCurrentLanguage(), pr);

                return(OkOrNoContent <dynamic>(data));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }