Example #1
0
        public IActionResult Index(string creditCards)
        {
            Dictionary <string, bool> CcDictionary = new Dictionary <string, bool>();
            IEnumerable <string>      numbers      = creditCards.Trim().Split('\n').ToList().Distinct();

            foreach (string cc in numbers)
            {
                CcDictionary.Add(cc.Trim(), _checker.CheckCC(cc.Trim()));
            }

            return(View(CcDictionary));
        }