public IActionResult GetDepartment(int id) { var department = _deptRepo.GetBy(x => x.Id == id); if (department == null) { return(NotFound()); } return(Ok(department)); }