Пример #1
0
        public ActionResult Index(string commentText)
        {
            Comment newComment = new Comment();

            newComment.email   = Session["email"].ToString();
            newComment.comment = commentText;
            CommentsModel.InsertComment(newComment);
            return(RedirectToAction("Index", "Comments"));
        }
Пример #2
0
        public JsonResult AgregarComentario(string Comentario)
        {
            var resultado = new JsonResult();

            Comment newComment = new Comment();

            newComment.email   = Session["email"].ToString();
            newComment.comment = Comentario;
            CommentsModel.InsertComment(newComment);

            return(resultado);
        }