Beispiel #1
0
        public IActionResult Create(Transactions transactions)
        {
            var wallet = _transactionDataAccess.AddAsync(new Transactions()
            {
                Id              = ObjectId.GenerateNewId().ToString(),
                WalletId        = transactions.WalletId,
                UserId          = transactions.UserId,
                Balance         = transactions.Balance,
                TransactionName = transactions.TransactionName,
                TransactionTime = DateTime.Now.AddHours(3)
            });

            if (wallet == null)
            {
                return(BadRequest(new { message = "Wallet eklenemedi!" }));
            }

            return(Ok(new { wallet.Result }));
        }