Ejemplo n.º 1
0
        private static void ShowUsersWithAwards()
        {
            User[] users = userLogic.GetAll();
            Console.WriteLine("Users with awards: ");
            Console.WriteLine();
            foreach (var user in users)
            {
                Console.WriteLine($"ID: {user.Id}, Name: {user.Name}, Birthday: {user.Birthday}, Age: {user.Age}");
                Console.Write("Awards: ");
                var awardsIdsOfUser = userLogic.GetUserAwardsIds(user.Id);
                foreach (var award in awardLogic.GetAwardsByIds(awardsIdsOfUser))
                {
                    Console.Write("{0} ", award.Name);
                }

                Console.WriteLine();
                Console.WriteLine();
            }
        }