public async Task <IActionResult> GetAll() { try { var alarmsCurrents = await _alarmService.GetAll(); if (alarmsCurrents == null) { return(NotFound()); } return(Ok(alarmsCurrents)); } catch (Exception ex) { return(StatusCode(500, ex.Message)); } }