Exemple #1
0
        public ActionResult AddReply(AddReplyViewModel model, Post post)
        {
            if (ModelState.IsValid)

            {
                PostReply reply = new PostReply();

                reply.Content = model.ReplyContent;
                reply.Created = DateTime.Now;


                _replyService.AddReply(reply, post);

                return(RedirectToAction("GetPost", "Post", new { id = post.Id }));
            }

            return(View(model));
        }
Exemple #2
0
 public void AddReply(PostReply reply, Post post)
 {
     _dao.AddReply(reply, post);
 }