This should be an extension method in ConnectionExtensions.