Esempio n. 1
0
        public IActionResult CreateMessage(int UserID, string Message)
        {
            TempData["Added"] = "Your Message Has Been Sent!";
            User          user    = authProvider.GetCurrentUser();
            MessagesModel message = new MessagesModel
            {
                MessageBody = Message,
                SentToID    = UserID,
                SentByID    = user.TeamID
            };

            messageDAL.AddMessageToDB(message);
            return(RedirectToAction("UserHomePage", "User"));
        }