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