public async Task <IActionResult> GetMenuCategories(int menuId, [FromQuery] MenuResourceParameters menuParams) { // Get menus for restaurant var menuCatEnts = await _menuService.GetMenuCategoriesAsync(menuId, menuParams); // Map menu entities to models var menuCatModels = _menuMapper.MenuCategoryEntitiesToModels(menuCatEnts); return(Ok(menuCatModels)); }
public async Task <IActionResult> GetMenuItems(int categoryId, [FromQuery] MenuResourceParameters menuParams) { // Get menu items for menu category var menuItemEnts = await _menuService.GetMenuItemsAsync(categoryId, menuParams); // Map menu item entities to models var menuItemModels = _menuMapper.MenuItemEntitiesToModels(menuItemEnts); return(Ok(menuItemModels)); }