public async Task <ValidationResult> Create(GamePostDto dto, string username)
        {
            var user             = _accountApplicationService.GetByUsername(username);
            var game             = CreateMapper(dto, user.Id);
            var validationResult = await _gameValidation.CreateValidation.ValidateAsync(game);

            if (!validationResult.IsValid)
            {
                return(validationResult);
            }

            _uow.GameRepository.Add(game);
            await _uow.CommitAsync();

            return(validationResult);
        }
        public async Task <ValidationResult> Lend(BorrowedGamePostDto dto, string username)
        {
            var user             = _accountApplicationService.GetByUsername(username);
            var borrowedGame     = LendMapper(dto, user.Id);
            var validationResult = await _borrowedGameValidation.LendValidation.ValidateAsync(borrowedGame);

            if (!validationResult.IsValid)
            {
                return(validationResult);
            }

            using var transaction = _uow.Database.BeginTransaction();
            _uow.BorrowedGameRepository.Add(borrowedGame);
            await _uow.CommitAsync();

            await _gameApplicationService.UpdateBorrowed(dto.IdGame, true);

            await transaction.CommitAsync();

            return(validationResult);
        }