The attorney general is the legal counsel for the board and shall advise the board and represent it in a legal proceeding.