private void CreateTransactionHistoryReport(TransactionInfo tranInfo, CardAccount cardAccount)
 {
     automatedTellerMachineContext.TransactionsHistories.Add(new TransactionsHistory()
     {
         Ammount         = tranInfo.MoneyToRetrieve,
         TransactionDate = DateTime.Now,
         CardAccount     = cardAccount
     });
 }
        public static void ValidateAccountAmount(CardAccount account, decimal amount)
        {
            if (amount < 0)
            {
                throw new InvalidOperationException("Invalid operation. The amount must be a positive number.");
            }

            if (account.CardCash < amount)
            {
                throw new InvalidOperationException("Insufficient amount. Please, try again.");
            }
        }