Beispiel #1
0
        public ActionResult Comment(VideoCommentViewModel model)
        {
            string returnUrl = Request.UrlReferrer.AbsolutePath + Request.UrlReferrer.Query;
            string userId    = User.Identity.GetUserId();

            model.Comment.Author = helper.GetUsers(userId);
            model.Comment.Video  = helper.GetVideos(model.Video.ID);

            helper.AddComment(model.Comment);

            return(Redirect(returnUrl));
        }