예제 #1
0
        public virtual ActionResult GetAll([DataSourceRequest] DataSourceRequest request,
                                           MarketType market,
                                           string marketplaceId,
                                           DateTime?dateFrom,
                                           DateTime?dateTo,
                                           int?type)
        {
            LogI("GetAll, market=" + market
                 + ", marketplaceId=" + marketplaceId
                 + ", dateFrom=" + dateFrom
                 + ", dateTo=" + dateTo);

            var searchFilter = new FeedFilterViewModel()
            {
                Market        = market,
                MarketplaceId = marketplaceId,
                DateFrom      = dateFrom,
                DateTo        = dateTo,
                Type          = type,
            };
            var items      = FeedViewModel.GetAll(Db, Time, searchFilter);
            var dataSource = items.ToDataSourceResult(request);

            return(Json(dataSource, JsonRequestBehavior.AllowGet));
        }