public IActionResult DeleteComment(int id) { if (_commentData.GetComment(id) != null) { _commentData.DeleteComment(id); return(Ok("comment Deleted")); } return(NotFound($"Comment with Id of {id} does not exist")); }
public IActionResult DeleteComment(int id) { _commentData.DeleteComment(id); return(RedirectToAction(nameof(Index), "Home")); }