public IActionResult AddFavoriteForUser(Guid userId, [FromBody] FavoriteForCreationDto favorite)
        {
            try
            {
                if (!_userRepository.UserExists(userId))
                {
                    return(NotFound(new { message = $"User {userId} does not exist" }));
                }

                var favoriteEntity = _mapper.Map <Favorite>(favorite);

                _favoriteRepository.AddFavoriteForUser(userId, favoriteEntity);

                if (!_favoriteRepository.Save())
                {
                    throw new AppException($"Adding a favorite for user {userId} failed on save.");
                }

                var favoriteToReturn = _mapper.Map <FavoriteDto>(favoriteEntity);

                return(CreatedAtRoute("GetFavoriteForUser", new { userId = userId, id = favoriteToReturn.Id }, favoriteToReturn));
            }
            catch (AppException ex)
            {
                return(BadRequest(new { message = ex.Message }));
            }
        }