public async Task <IActionResult> SendMessage(
            int roomId,
            string message,


            [FromServices] AppDbContext ctx)
        {
            //Message model
            var Message = new Message
            {
                ChatId         = roomId,
                Text           = message,
                TranslatedText = Transslate.Translate(message, "sv").Result,
                Name           = User.Identity.Name,
                Timestamp      = DateTime.Now
            };

            ctx.Messages.Add(Message);
            await ctx.SaveChangesAsync();

            await _chat.Clients.Group(roomId.ToString())
            .SendAsync("RecieveMessage", new {
                Text = Message.TranslatedText,
                //Text = Transslate.Translate(Message.Text, "sv").Result,
                //Text = (Message.Name==User.Identity.Name) ?  Message.Text : Message.TranslatedText,
                Message.Name,
                Timestamp = Message.Timestamp.ToString("dd/MM/yyyy hh:mm:ss")
            });

            return(Ok());
        }
        public async Task <IActionResult> CreateMessage(int chatId, string message, string name)
        {
            var Message = new Message
            {
                ChatId = chatId,
                Text   = Transslate.Translate(message, "sv").Result,
                //Text = message,
                Name      = User.Identity.Name,
                Timestamp = DateTime.Now
            };

            _ctx.Messages.Add(Message);
            await _ctx.SaveChangesAsync();

            return(RedirectToAction("Chat", new { id = chatId }));
        }