Esempio n. 1
0
        public IActionResult SeeMessages()
        {
            User user = authProvider.GetCurrentUser();
            List <MessagesModel> messages = messageDAL.GetMessagesByUser(user);
            Team team = new Team();

            foreach (MessagesModel message in messages)
            {
                team = teamDAL.GetTeamByUserID(message.SentByID);
                message.SentByName = team.Name;
            }
            return(View(messages));
        }