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)); }
public async Task <IActionResult> GetFoodsByCategory(long category, [FromQuery] GeneralPaginationQuery paginationQuery) { var query = new FilterFoodsQuery(paginationQuery, category, "category"); return(await HandleQueryResultFor(query)); }
public FilterFoodsQuery(GeneralPaginationQuery paginationQuery, long filterValue, string filterBy) { PageNumber = paginationQuery.PageNumber; PageSize = paginationQuery.PageSize; OrderBy = paginationQuery.OrderBy; FilterBy = filterBy; FilterValue = filterValue; }
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; }
public GetDealsQuery(GeneralPaginationQuery paginationQuery) { PageNumber = paginationQuery.PageNumber; PageSize = paginationQuery.PageSize; OrderBy = paginationQuery.OrderBy; }
public GetCategoriesQuery(GeneralPaginationQuery paginationQuery) { PageNumber = paginationQuery.PageNumber; PageSize = paginationQuery.PageSize; OrderBy = paginationQuery.OrderBy ?? ""; }
public async Task <IActionResult> GetDeals([FromQuery] GeneralPaginationQuery paginationQuery) { var query = new GetDealsQuery(paginationQuery); return(await HandleQueryResultFor(query)); }