Esempio n. 1
0
        public async Task <IList <bool> > CheckGuess(Dictionary <string, string> attempts)
        {
            var employees = _seedData.Cache;

            if (employees == null || employees.Count == 0)
            {
                await _seedData.RefreshCache();
            }

            var gradedGuess = new List <bool>();

            foreach (var guess in attempts)
            {
                var employee = _seedData.Cache.SingleOrDefault(x => x.Id == guess.Key);
                gradedGuess.Add(employee?.FirstName == guess.Value);
            }

            return(gradedGuess);
        }