public IActionResult Delete(int id) { if (!_userService.Delete(id)) { return(NotFound()); } return(Ok()); }
public ActionResult Delete(int id) { try { _userRepository.Delete(id); } catch (Exception) { return(Json(new { IsSuccess = false, Messenger = string.Format("Xóa danh người dùng thất bại") }, JsonRequestBehavior.AllowGet)); } return(Json(new { IsSuccess = true, Messenger = "Xóa người dùng thành công", }, JsonRequestBehavior.AllowGet)); }