Exemplo n.º 1
0
        private static void ShowUsersWithAwards()
        {
            User[] users = userLogic.GetAll();
            Console.WriteLine("List of users with awards:");
            foreach (var user in users)
            {
                Console.Write($"ID:{user.Id}; Name - {user.Name}; DateOfBirth - {user.DateOfBirth.Day}/{user.DateOfBirth.Month}/{user.DateOfBirth.Year}; Age - {user.Age}; Awards: ");
                foreach (var item in awardLogic.GetAwardsByIDs(userLogic.GetUserAwardsIDs(user.Id)))
                {
                    Console.Write("{0} ", item.Title);
                }

                Console.WriteLine();
            }
            Console.Write("Press any button to continue...");
            Console.ReadLine();
        }