public IActionResult GetAll()
 {
     try
     {
         return(Ok(_departmentData.GetAll()));
     }
     catch (Exception ex)
     {
         return(Problem(ex.Message, nameof(GetAll), StatusCodes.Status500InternalServerError, "Fail getting the departments."));
     }
 }