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" })); }
public IActionResult DeleteComment([FromRoute] Guid commentId) { var result = _commentLogic.DeleteComment(commentId); if (result == false) { return(NotFound()); } return(Ok()); }
public void DeleteComment(int commentId) { _commentLogic.DeleteComment(commentId); }
public async Task DeleteCommentAsync(Guid ID) { await _commentLogic.DeleteComment(ID); }