示例#1
0
        public IActionResult DeleteComment([FromForm] int Id)
        {
            bool deletedComment = _commentService.DeleteComment(Id);

            if (deletedComment)
            {
                return(Json(new { status = 200, message = "Delete complete" }));
            }
            return(Json(new { status = 500, message = "Delete failed" }));
        }
示例#2
0
        public IActionResult DeleteComment([FromRoute] Guid commentId)
        {
            var result = _commentLogic.DeleteComment(commentId);

            if (result == false)
            {
                return(NotFound());
            }
            return(Ok());
        }
示例#3
0
 public void DeleteComment(int commentId)
 {
     _commentLogic.DeleteComment(commentId);
 }
示例#4
0
 public async Task DeleteCommentAsync(Guid ID)
 {
     await _commentLogic.DeleteComment(ID);
 }