Replace conneciton with transaction in IContractCodeGenerator.GenerateContractCode().