Refactor to get the active transaction based on the connectionstring