Ejemplo n.º 1
0
        public ActionResult Create(CreateCommentInputModel model)
        {
            if (this.ModelState.IsValid)
            {
                try
                {
                    var comment = commentsService.CommentMovie(model, this.LoggedInUserId);
                    return(PartialView("_CommentPartial", comment));
                }
                catch (Exception ex)
                {
                    this.AddNotification(ex.Message, NotificationType.ERROR);
                    return(PartialView("_CreateCommentPartial", model.MovieId));
                }
            }

            return(PartialView("_CreateCommentPartial", model.MovieId));
        }