public async Task <IActionResult> All() { try { var departments = await _repository.All(); return(Ok(departments)); } catch (Exception) { throw; } }