Exemple #1
0
        public async Task <OperationResult <CommentModel> > DeleteCommentAsync(int commentId)
        {
            var comment = await _commentModelDbOperations.GetAsync(commentId);

            if (comment == null)
            {
                return(OperationResult <CommentModel> .NotFound());
            }

            await _commentModelDbOperations.DeleteAsync(comment);

            return(OperationResult <CommentModel> .Ok());
        }