public async Task <CommentDto> CreateAsync(CreateCommentInput input) { var user = await CmsUserLookupService.FindByIdAsync(CurrentUser.Id.Value); if (user == null) { throw new BusinessException(message: "User Not found!"); } var comment = await CommentRepository.InsertAsync(new Comment( GuidGenerator.Create(), input.EntityType, input.EntityId, input.Text, input.RepliedCommentId, CurrentUser.Id.Value )); return(ObjectMapper.Map <Comment, CommentDto>(comment)); }
public Task <CommentDto> CreateAsync(CreateCommentInput input) { return(CommentPublicAppService.CreateAsync(input)); }