public async Task <ActionResult> Say(string channelId, SentenceViewModel sentenceViewModel) { var sentence = SentenceViewModel.Map(User, channelId, sentenceViewModel); await _chatService.Add(User, sentence); return(Ok()); }
public ActionResult AddSentence() { SentenceViewModel model = new SentenceViewModel(); var m = model; return(View(model)); // here is the change }
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)); }