Exemplo n.º 1
0
        private void ShowUsers()
        {
            IEnumerable <User> users = _userLogic.GetAll();

            if (users.Count() != 0)
            {
                foreach (var user in users)
                {
                    Console.WriteLine(user.ToString());

                    IEnumerable <Award> userAwards = _awardLogic.GetUserAwardsByUserId(user.Id);

                    if (userAwards != null && userAwards.Count() > 0)
                    {
                        Console.Write("    + Awards: ");

                        foreach (var award in userAwards)
                        {
                            Console.Write($"\"{award.Title}\" ");
                        }
                        Console.WriteLine();
                    }
                }
            }
            else
            {
                Console.WriteLine($"User list is empty!{Environment.NewLine}");
            }
        }