Beispiel #1
0
        public async Task <IActionResult> AddComment(Guid id, string comment)
        {
            if (ModelState.IsValid && !string.IsNullOrEmpty(comment))
            {
                var score = await TextService.GetScore(comment);

                var phrase = await TextService.GetKeyPhrases(comment);

                await ImageService.AddComment(id, comment, score, phrase);
            }

            return(RedirectToAction("View", new { id }));
        }