public IActionResult GetNrStudents() { try { return(Ok(_statisticsRepository.GetNumberOfStudents())); } catch (Exception ex) { _logger.LogCritical($"An exception was thrown: ", ex); return(StatusCode(500, "A problem happend while handeling your request.")); } }