コード例 #1
0
        public async Task <IActionResult> GetFoodsByDeal(long deal,
                                                         [FromQuery] GeneralPaginationQuery paginationQuery)
        {
            var query = new FilterFoodsQuery(paginationQuery, deal, "deal");

            return(await HandleQueryResultFor(query));
        }
        public async Task <IActionResult> GetFoodsByRestaurant(long restaurant,
                                                               [FromQuery] GeneralPaginationQuery paginationQuery)
        {
            var query = new FilterFoodsQuery(paginationQuery, restaurant, "restaurant");

            return(await HandleQueryResultFor(query));
        }
コード例 #3
0
        public async Task <IActionResult> GetFoodsByCategory(long category,
                                                             [FromQuery] GeneralPaginationQuery paginationQuery)
        {
            var query = new FilterFoodsQuery(paginationQuery, category, "category");

            return(await HandleQueryResultFor(query));
        }
コード例 #4
0
 public FilterFoodsQuery(GeneralPaginationQuery paginationQuery, long filterValue, string filterBy)
 {
     PageNumber  = paginationQuery.PageNumber;
     PageSize    = paginationQuery.PageSize;
     OrderBy     = paginationQuery.OrderBy;
     FilterBy    = filterBy;
     FilterValue = filterValue;
 }
コード例 #5
0
 public GetRestaurantsQuery(GeneralPaginationQuery paginationQuery)
 {
     PageNumber  = paginationQuery.PageNumber;
     PageSize    = paginationQuery.PageSize;
     OrderBy     = paginationQuery.OrderBy;
     FilterBy    = paginationQuery.FilterBy;
     FilterValue = paginationQuery.FilterValue;
 }
 public FilterFoodsByMenuQuery(GeneralPaginationQuery paginationQuery, long restaurantId, long menuId)
 {
     RestaurantId = restaurantId;
     MenuId       = menuId;
     PageNumber   = paginationQuery.PageNumber;
     PageSize     = paginationQuery.PageSize;
     OrderBy      = paginationQuery.OrderBy;
 }
コード例 #7
0
 public GetDealsQuery(GeneralPaginationQuery paginationQuery)
 {
     PageNumber = paginationQuery.PageNumber;
     PageSize   = paginationQuery.PageSize;
     OrderBy    = paginationQuery.OrderBy;
 }
コード例 #8
0
 public GetCategoriesQuery(GeneralPaginationQuery paginationQuery)
 {
     PageNumber = paginationQuery.PageNumber;
     PageSize   = paginationQuery.PageSize;
     OrderBy    = paginationQuery.OrderBy ?? "";
 }
コード例 #9
0
        public async Task <IActionResult> GetDeals([FromQuery] GeneralPaginationQuery paginationQuery)
        {
            var query = new GetDealsQuery(paginationQuery);

            return(await HandleQueryResultFor(query));
        }