public List <ShowFoodDto> ListFoods() { var adapter = new ListFoodAdapter(); var list = _restaurantManager.ListFood(); return(adapter.Transform(list)); }
public List <ShowFoodDto> ListFoodsNotInMenu(long menuId) { var menu = _restaurantManager.GetMenuWithMappings(menuId); if (menu != null) { var menuFoodMappings = menu.FoodMappings; var mappedFoods = _restaurantManager.ListNonMenuFoods(menuFoodMappings); var adapter = new ListFoodAdapter(); return(adapter.Transform(mappedFoods)); } else { throw new Exception("Given menu is not found"); } }