Exemplo n.º 1
0
        public ActionResult _ChildComment(long?parentId)
        {
            if (!parentId.HasValue)
            {
                return(HttpNotFound());
            }

            CommentService commentService = new CommentService();
            Comment        comment        = commentService.Get(parentId.Value);

            if (comment == null)
            {
                return(HttpNotFound());
            }

            MicroblogEntity entity = microblogService.Get(comment.CommentedObjectId);

            if (entity == null)
            {
                return(HttpNotFound());
            }

            MicroblogCommentEditModel editModel = comment.AsMicroblogCommentEditModel();

            editModel.OriginalAuthor = entity.Author;

            return(View(editModel));
        }