public async Task AddBookComment(BookCommentCreateModel bookCommentCreateModel, string userId) { if (bookCommentCreateModel == null || bookCommentCreateModel.BookId.IsNullOrEmpty() || bookCommentCreateModel.Comment.IsNullOrEmpty()) { throw new CustomException("Некоректные данные"); } var model = _mapper.Map <BookComment>(bookCommentCreateModel); model.UserId = userId; await _commentRepository.AddBookComment(model); }