Add dispose method to entitymanagers