public async Task <IActionResult> GetAllAlerts() { try { var result = await _alert.GetAllAlerts(); if (result != null) { 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()); } }