public async Task <ActionResult> Say(string channelId, SentenceViewModel sentenceViewModel)
        {
            var sentence = SentenceViewModel.Map(User, channelId, sentenceViewModel);
            await _chatService.Add(User, sentence);

            return(Ok());
        }
Example #2
0
        public ActionResult AddSentence()
        {
            SentenceViewModel model = new SentenceViewModel();

            var m = model;

            return(View(model));
            // here is the change
        }
Example #3
0
        public ActionResult AddSentence(SentenceViewModel model)
        {
            model.Entities = _analyzer.Analyze(model.Sentence);

            foreach (NerEntity ent in model.Entities)
            {
                DateTimeTranslator translator = new DateTimeTranslator();

                if (ent.Class == "@date")
                {
                    ent.Value = translator.Translate(ent.Value);
                }
            }

            return(View(model));
        }