public ResultHelperModel AddComment(CreatCommentDto dto) { var result = new ResultHelperModel { Success = true, Message = string.Empty }; try { var comment = _mapper.Map <Comment>(dto); comment.AddedDate = DateTime.Now; _baseRepository.Create(comment); } catch (Exception ex) { result.Success = false; result.Message = ex.Message; } return(result); }
public IActionResult AddComment(CreatCommentDto dto) { var result = _commentService.AddComment(dto); return(Ok(result)); }