public IActionResult GetLogByUnitId(int id) { if (repo.GetAlarmLogByUnitId(id).Any()) { return(Ok(repo.GetAlarmLogByUnitId(id))); } else { return(NotFound()); } }