/**
  * Delete a department
  *
  * @param DepartmentEntity the department object
  */
 public function delete(DepartmentEntity $department)
 {
     $sql = "DELETE FROM Department WHERE Id = :id";
     $stmt = $this->db->prepare($sql);
     $result = $stmt->execute(["id" => $department->getId()]);
     if (!$result) {
         throw new Exception("could not delete record");
     }
 }