public async void Should_CreateNewTransactionAsync_Valid()
        {
            var transactionViewModel = new TransactionViewModel
            {
                AccountId = 1.ToGuid().ToString(),
                Amount    = 0f,
                Info      = "Info"
            };
            var transactionDto = transactionViewModel.ToTransactionModel <TransactionDto>(1.ToString());

            var newCreatedAccount = await _manager.CreateNewTransactionAsync(transactionDto);

            Assert.NotNull(newCreatedAccount);
        }
        public async Task <ActionResult <TransactionDto> > CreateNewTransaction(
            [FromQuery] TransactionViewModel transactionViewModel
            )
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var profileId = _httpContextAccessor.GetUserIdentifier();

            if (profileId == null)
            {
                return(NotFound());
            }

            var newTransaction = await _transactionsManager.CreateNewTransactionAsync(
                transactionViewModel.ToTransactionModel <TransactionDto>(profileId)
                );

            if (newTransaction == null)
            {
                return(NotFound());
            }

            return(CreatedAtAction(
                       nameof(CreateNewTransaction),
                       new { id = newTransaction.Id },
                       newTransaction
                       ));
        }