예제 #1
0
        private static void ShowUsers(IUserLogic userLogic, IAwardLogic awardLogic)
        {
            Console.WriteLine("Id|Name|Age");
            foreach (var user in userLogic.GetAll())
            {
                Console.WriteLine(user);
                Console.Write($"User's awards:");
                Dictionary <int, List <int> > awardId_UsersIDs = awardLogic.GetDictOfAwardsAndUsers();
                foreach (var item in awardId_UsersIDs)
                {
                    if (item.Value.Contains(user.Id))
                    {
                        Console.Write(awardLogic.GetById(item.Key));
                    }
                }

                Console.WriteLine();
            }
        }