예제 #1
0
        public void Add(AddOrEditCommentRequest comment)
        {
            var commentModel = _mapper.Map <CommentModel>(comment);

            commentModel.CreatedOn = DateTime.Now;

            _commentRepo.Add(commentModel);
            _commentRepo.SaveChange();
        }
예제 #2
0
 public void Add([FromBody] AddOrEditCommentRequest comment)
 {
     _commentService.Add(comment);
 }