Exemplo n.º 1
0
 /// <summary>
 /// Insertion du message dans la base de données
 /// </summary>
 public void InsertChatMessage(chathistory chatMessage)
 {
     try
     {
         mainControl.ChatHistoryService.InsertChatMessage(chatMessage);
     }
     catch (ServiceException serviceException)
     {
         ExceptionLog.LogTheError(serviceException.Message);
     }
 }
Exemplo n.º 2
0
        public void SendMessage(SendData data)
        {
            Clients.Group(data.roomName, Context.ConnectionId).newMessage(data.name, data.message, data.roomName);

            chathistory message = new chathistory();

            message.Author_ID = data.authorId;
            message.Group_ID  = int.Parse(data.roomName);
            message.Message   = data.message;

            groupFacade.InsertChatMessage(message);
        }