public static string deletePost(int id) { var post = NotifyController.GetByID(id); string result = ""; if (post != null) { string deletePost = NotifyController.Delete(id); if (!string.IsNullOrEmpty(deletePost)) { result = "success"; } else { result = "failed"; } } else { result = "notfound"; } return(result); }