Esempio n. 1
0
        public async Task <IActionResult> Index()
        {
            KeyValuePair <string, string> countryCityPair = new KeyValuePair <string, string>();

            countryCityPair = Randoms.GetRandomEntryFromDictAsync(await FileData.ConvertFileContentToDictAsync(FileData._countryCapitalFile));

            Round = new Round
            {
                Capital            = countryCityPair.Value.Trim().Replace(" ", "").ToLower(),
                Country            = countryCityPair.Key.Trim(),
                CapitalPlaceholder = new String('_', countryCityPair.Value.Trim().Replace(" ", "").Length),
            };

            return(View(Round));
        }