Ideally this code would check for the existence of a 'connectionString' property on the object and use that and only fall back to using the connection string builder if it was not present.