public bool SendMessage(MessageTO message)
        {
            MessageDomain _message = message.ToDomain();

            if (!_message.IsEmpty)
            {
                switch (_message.Message.MessageType)
                {
                case MessageType.chat:
                    return(_message.SendMessage());

                case MessageType.email:
                    return(_message.SendMail());
                }
            }
            return(false);
        }
        public async Task <ActionResult> SendMessage([FromBody] Message message, [ModelBinder(typeof(LoggedInUserModelBinder))] User activeUser)
        {
            message.Id = await domain.SendMessage(message, activeUser);

            return(Ok(new { MessageId = message.Id, DateSent = message.DateSent }));//lightweight JSON object
        }