public ActionResult Transaction()
        {
            try
            {
                Transaction model = new Transaction();
                model.ListofTransactions = transactionRepository.Get();

                List<SelectListItem> types = new List<SelectListItem>();

                types.Add(new SelectListItem { Text = "Debit", Value = "0" });

                types.Add(new SelectListItem { Text = "Credit", Value = "1" });

                ViewBag.TxnType = types;

                model.Cards = GetCards();

                return View(model);
            }
            catch (Exception ex)
            {
                logger.Error("Error while getting a transaction details. Error Details are: " + ex.Message);
                return RedirectToAction("Index", "Error");
            }
        }
        public ActionResult AddTransaction(Transaction transaction)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    transactionRepository.Add(transaction);
                    return new JavaScriptResult { Script = "alert('Transactions added sucessfully');" };
                }

            }
            catch (Exception ex)
            {
                logger.Error("Error while adding a transaction. Error Details are: " + ex.Message);
                return new JavaScriptResult { Script = "alert('Error while adding transaction');" };
            }
            return View();
        }