public ActionResult Create(ArticleDetailsViewModel viewModel) { _articleCommentRepository.Add(viewModel); return(RedirectToAction("Details", "Article", new { id = viewModel.NewComment.ArticleId })); }
public void AddArticleComment(ArticleCommentDto commentDto) { _articleRepository.Add(QsMapper.CreateMap <ArticleCommentDto, ArticleComment>(commentDto)); _articleRepository.UnitOfWork.Commit(); IncreaseCommentNumsOf("Article", commentDto.ArticleId); }