public async Task <IActionResult> DeleteAlert(int id) { try { var result = await _alert.DeleteAlert(id); if (result != 0) { var Response = new ResponseViewModel(true, HttpStatusCode.OK, "SUCCESS", result); return(Ok(Response)); } else { var Response = new ResponseViewModel(false, HttpStatusCode.NoContent, "failed", null); return(Ok(Response)); } } catch { return(BadRequest()); } }