public async Task <ActionResult <FoodItemDto> > CreateFoodItemForRestaurantAsync(Guid restaurantId, FoodItemCreationDto foodItemCreateDto)
        {
            var restaurant = await _restaurantService.GetRestaurantAsync(restaurantId);

            if (restaurant == null)
            {
                return(BadRequest("The given restaurant doesn't exists"));
            }
            var foodItemCreate = _mapper.Map <FoodItem>(foodItemCreateDto);

            _foodItemsService.AddFoodItemToRestaurantAsync(restaurantId, foodItemCreate);
            if (!await _foodItemsService.SaveAsync())
            {
                throw new Exception("Something went wrong");
            }
            var foodItemDto = _mapper.Map <FoodItemDto>(foodItemCreate);

            return(CreatedAtRoute("GetFoodItem", new { restaurantId = restaurantId, foodItemId = foodItemCreate.Id }, foodItemDto));
        }
        public async Task <ActionResult> UpdateFoodItemForRestaurantAsync(Guid restaurantId, Guid foodItemId, FoodItemCreationDto foodItemCreationDto)
        {
            var restaurant = await _restaurantService.GetRestaurantAsync(restaurantId);

            if (restaurant == null)
            {
                return(BadRequest("The given restaurant doesn't exists"));
            }

            var foodItem = await _foodItemsService.GetFoodItemForRestaurantAsync(restaurantId, foodItemId);

            _mapper.Map(foodItemCreationDto, foodItem);
            await _foodItemsService.EditFoodItemForRestaurantAsync(foodItem);

            if (!await _foodItemsService.SaveAsync())
            {
                throw new Exception("Something went wrong");
            }
            return(NoContent());
        }