Esempio n. 1
0
        public ActionResult Index()
        {
            var banks = _getBanksUseCase.Get()
                        .Select(response =>
                                new BankViewModel
            {
                BankId        = response.BankId,
                BankName      = response.BankName,
                AccountNumber = response.AccountNumber,
                LoginId       = response.LoginId,
                Password      = response.Password,
                Url           = response.Url
            }
                                ).ToList();

            return(View(banks));
        }
Esempio n. 2
0
        public IActionResult Create()
        {
            var bankNames = _getBanksUseCase.Get()
                            .Select(response => new SelectListItem(response.BankName, response.BankId.ToString()))
                            .ToList();

            var cardTypes = _getCardTypesUseCase.Get()
                            .Select(response => new SelectListItem(response.CardType, response.CardTypeId.ToString()))
                            .ToList();

            var cardViewModel = new CardViewModel
            {
                BankNames = bankNames,
                CardTypes = cardTypes
            };

            return(View(cardViewModel));
        }