Some refactoring in DbConnection